From 246a02fb14953a8d2c5b72329aebcda787a96c8c Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 7 Jun 2017 15:04:38 +0200 Subject: Use std::unordered_{map,set} (C++11) instead of boost::unordered_{map,set} --- src/memusage.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/memusage.h') diff --git a/src/memusage.h b/src/memusage.h index b69acafffd..710120d285 100644 --- a/src/memusage.h +++ b/src/memusage.h @@ -16,8 +16,6 @@ #include #include -#include -#include namespace memusage { @@ -148,8 +146,6 @@ static inline size_t DynamicUsage(const std::shared_ptr& p) return p ? MallocUsage(sizeof(X)) + MallocUsage(sizeof(stl_shared_counter)) : 0; } -// Boost data structures - template struct unordered_node : private X { @@ -157,18 +153,6 @@ private: void* ptr; }; -template -static inline size_t DynamicUsage(const boost::unordered_set& s) -{ - return MallocUsage(sizeof(unordered_node)) * s.size() + MallocUsage(sizeof(void*) * s.bucket_count()); -} - -template -static inline size_t DynamicUsage(const boost::unordered_map& m) -{ - return MallocUsage(sizeof(unordered_node >)) * m.size() + MallocUsage(sizeof(void*) * m.bucket_count()); -} - template static inline size_t DynamicUsage(const std::unordered_set& s) { -- cgit v1.2.3