diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/datastor/datastor.cpp | 7 | ||||
-rw-r--r-- | src/utils/stl_util.h | 19 |
2 files changed, 2 insertions, 24 deletions
diff --git a/src/utils/datastor/datastor.cpp b/src/utils/datastor/datastor.cpp index 129dad9bf..9f8ba2c24 100644 --- a/src/utils/datastor/datastor.cpp +++ b/src/utils/datastor/datastor.cpp @@ -65,12 +65,9 @@ Data_Store::search_with(const Matcher& matcher) const */ std::vector<std::string> Data_Store::get(const std::string& looking_for) const { - typedef std::multimap<std::string, std::string>::const_iterator iter; - - std::pair<iter, iter> range = contents.equal_range(looking_for); - std::vector<std::string> out; - for(iter i = range.first; i != range.second; ++i) + auto range = contents.equal_range(looking_for); + for(auto i = range.first; i != range.second; ++i) out.push_back(i->second); return out; } diff --git a/src/utils/stl_util.h b/src/utils/stl_util.h index fc4d4effe..4cc081733 100644 --- a/src/utils/stl_util.h +++ b/src/utils/stl_util.h @@ -37,25 +37,6 @@ inline R search_map(const std::map<K, V>& mapping, const K& key, } /* -* Function adaptor for delete operation -*/ -template<class T> -class del_fun : public std::unary_function<T, void> - { - public: - void operator()(T* ptr) { delete ptr; } - }; - -/* -* Delete the second half of a pair of objects -*/ -template<typename Pair> -void delete2nd(Pair& pair) - { - delete pair.second; - } - -/* * Insert a key/value pair into a multimap */ template<typename K, typename V> |