aboutsummaryrefslogtreecommitdiff
path: root/src/memusage.h
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2017-06-07 15:04:38 +0200
committerpracticalswift <[email protected]>2017-06-07 15:04:54 +0200
commit246a02fb14953a8d2c5b72329aebcda787a96c8c (patch)
treea7f4a4d4c29c1dbc4f58b997b61acdee96274146 /src/memusage.h
parentMerge #10201: pass Consensus::Params& to functions in validation.cpp and make... (diff)
downloaddiscoin-246a02fb14953a8d2c5b72329aebcda787a96c8c.tar.xz
discoin-246a02fb14953a8d2c5b72329aebcda787a96c8c.zip
Use std::unordered_{map,set} (C++11) instead of boost::unordered_{map,set}
Diffstat (limited to 'src/memusage.h')
-rw-r--r--src/memusage.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/memusage.h b/src/memusage.h
index b69acafff..710120d28 100644
--- a/src/memusage.h
+++ b/src/memusage.h
@@ -16,8 +16,6 @@
#include <unordered_set>
#include <boost/foreach.hpp>
-#include <boost/unordered_set.hpp>
-#include <boost/unordered_map.hpp>
namespace memusage
{
@@ -148,8 +146,6 @@ static inline size_t DynamicUsage(const std::shared_ptr<X>& p)
return p ? MallocUsage(sizeof(X)) + MallocUsage(sizeof(stl_shared_counter)) : 0;
}
-// Boost data structures
-
template<typename X>
struct unordered_node : private X
{
@@ -158,18 +154,6 @@ private:
};
template<typename X, typename Y>
-static inline size_t DynamicUsage(const boost::unordered_set<X, Y>& s)
-{
- return MallocUsage(sizeof(unordered_node<X>)) * s.size() + MallocUsage(sizeof(void*) * s.bucket_count());
-}
-
-template<typename X, typename Y, typename Z>
-static inline size_t DynamicUsage(const boost::unordered_map<X, Y, Z>& m)
-{
- return MallocUsage(sizeof(unordered_node<std::pair<const X, Y> >)) * m.size() + MallocUsage(sizeof(void*) * m.bucket_count());
-}
-
-template<typename X, typename Y>
static inline size_t DynamicUsage(const std::unordered_set<X, Y>& s)
{
return MallocUsage(sizeof(unordered_node<X>)) * s.size() + MallocUsage(sizeof(void*) * s.bucket_count());