You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/10/30 15:18:48 UTC
[02/15] mesos git commit: Added a missing hash function for v1
resource provider ID.
Added a missing hash function for v1 resource provider ID.
Review: https://reviews.apache.org/r/63398
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a98a060c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a98a060c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a98a060c
Branch: refs/heads/master
Commit: a98a060c6e7fb6b3131f0e6f710647322d6d885d
Parents: ee67a66
Author: Jie Yu <yu...@gmail.com>
Authored: Sun Oct 29 15:23:35 2017 +0100
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Oct 30 16:18:31 2017 +0100
----------------------------------------------------------------------
include/mesos/v1/mesos.hpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a98a060c/include/mesos/v1/mesos.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.hpp b/include/mesos/v1/mesos.hpp
index 98a97a7..1b08d7a 100644
--- a/include/mesos/v1/mesos.hpp
+++ b/include/mesos/v1/mesos.hpp
@@ -686,6 +686,22 @@ struct hash<mesos::v1::OfferOperationID>
}
};
+
+template <>
+struct hash<mesos::v1::ResourceProviderID>
+{
+ typedef size_t result_type;
+
+ typedef mesos::v1::ResourceProviderID argument_type;
+
+ result_type operator()(const argument_type& resourceProviderId) const
+ {
+ size_t seed = 0;
+ boost::hash_combine(seed, resourceProviderId.value());
+ return seed;
+ }
+};
+
} // namespace std {
#endif // __MESOS_V1_HPP__