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:
parent
06f328207f
commit
cd684497c2
5 changed files with 12 additions and 15 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue