mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)
This commit is contained in:
@@ -21,14 +21,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "threading/mutex_auto_lock.h"
|
||||
|
||||
|
||||
UNORDERED_MAP<u16, std::vector<v3s16> > FacePositionCache::cache;
|
||||
std::unordered_map<u16, std::vector<v3s16>> FacePositionCache::cache;
|
||||
Mutex FacePositionCache::cache_mutex;
|
||||
|
||||
// Calculate the borders of a "d-radius" cube
|
||||
const std::vector<v3s16> &FacePositionCache::getFacePositions(u16 d)
|
||||
{
|
||||
MutexAutoLock lock(cache_mutex);
|
||||
UNORDERED_MAP<u16, std::vector<v3s16> >::iterator it = cache.find(d);
|
||||
std::unordered_map<u16, std::vector<v3s16>>::const_iterator it = cache.find(d);
|
||||
if (it != cache.end())
|
||||
return it->second;
|
||||
|
||||
|
Reference in New Issue
Block a user