aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-04 17:18:57 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-04 17:22:37 +0100
commitcd684497c28a93e1bca4fbe889eef2d6d5c59289 (patch)
tree20fd3eb2e9e3605803204140bfe2352018049c0d /src/util
parent06f328207fa0a3e606992d3569b061b335eb0f48 (diff)
downloadminetest-cd684497c28a93e1bca4fbe889eef2d6d5c59289.tar.gz
minetest-cd684497c28a93e1bca4fbe889eef2d6d5c59289.tar.bz2
minetest-cd684497c28a93e1bca4fbe889eef2d6d5c59289.zip
Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues()
Diffstat (limited to 'src/util')
-rw-r--r--src/util/container.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/util/container.h b/src/util/container.h
index 5e9f13d88..3ffd885e4 100644
--- a/src/util/container.h
+++ b/src/util/container.h
@@ -77,7 +77,6 @@ private:
std::queue<Value> m_queue;
};
-#if 1
template<typename Key, typename Value>
class MutexedMap
{
@@ -109,9 +108,9 @@ public:
return true;
}
- std::list<Value> getValues()
+ std::vector<Value> getValues()
{
- std::list<Value> result;
+ std::vector<Value> result;
for(typename std::map<Key, Value>::iterator
i = m_values.begin();
i != m_values.end(); ++i){
@@ -129,7 +128,6 @@ private:
std::map<Key, Value> m_values;
JMutex m_mutex;
};
-#endif
/*
Generates ids for comparable values.