1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues()

This commit is contained in:
Loic Blot 2015-03-04 17:18:57 +01:00
parent 06f328207f
commit cd684497c2
5 changed files with 12 additions and 15 deletions

View file

@ -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.