summaryrefslogtreecommitdiff
path: root/src/utility.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-05-21 11:07:03 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-05-21 11:07:03 +0300
commit969fbb189d16d87d26ceab29795644588fb90a32 (patch)
treea67a53a3ec9bd1afffda372587a9205d3ba8ef96 /src/utility.h
parenta8acf3c391b4dbdc4f4fd12b7a491a1c38dab337 (diff)
downloadminetest-969fbb189d16d87d26ceab29795644588fb90a32.tar.gz
minetest-969fbb189d16d87d26ceab29795644588fb90a32.tar.bz2
minetest-969fbb189d16d87d26ceab29795644588fb90a32.zip
All textures are are now searched first from the directory specified by the texture_path setting.
Diffstat (limited to 'src/utility.h')
-rw-r--r--src/utility.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/utility.h b/src/utility.h
index 84838c0c7..cc8891a07 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -1766,12 +1766,12 @@ private:
core::list<Value> m_list;
};
-#if 0
+#if 1
template<typename Key, typename Value>
-class MutexedCache
+class MutexedMap
{
public:
- MutexedCache()
+ MutexedMap()
{
m_mutex.Init();
assert(m_mutex.IsInitialized());
@@ -1793,8 +1793,10 @@ public:
if(n == NULL)
return false;
-
- *result = n->getValue();
+
+ if(result != NULL)
+ *result = n->getValue();
+
return true;
}