]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/Effect.hxx
Merge branch 'zan/stencil'
[simgear.git] / simgear / scene / material / Effect.hxx
index 1523dc25f012d6a30d3ad3f5d9a5a4a5c2267729..1f33b9e86d61209f7a0b1f6cb5c4a08b7aa64446 100644 (file)
@@ -19,8 +19,9 @@
 
 #include <vector>
 #include <string>
+#include <boost/tr1/unordered_map.hpp>
 
-#include <boost/unordered_map.hpp>
+#include <boost/functional/hash.hpp>
 
 #include <osg/Object>
 #include <osgDB/ReaderWriter>
@@ -114,19 +115,26 @@ protected:
     // shared.
     struct Key
     {
+        Key() {}
         Key(SGPropertyNode* unmerged_, const osgDB::FilePathList& paths_)
             : unmerged(unmerged_), paths(paths_)
         {
         }
-        const SGPropertyNode_ptr unmerged;
-        const osgDB::FilePathList paths;
+        Key& operator=(const Key& rhs)
+        {
+            unmerged = rhs.unmerged;
+            paths = rhs.paths;
+            return *this;
+        }
+        SGPropertyNode_ptr unmerged;
+        osgDB::FilePathList paths;
         struct EqualTo
         {
             bool operator()(const Key& lhs, const Key& rhs) const;
         };
     };
-    typedef boost::unordered_map<Key, osg::ref_ptr<Effect>, boost::hash<Key>,
-                                 Key::EqualTo> Cache;
+    typedef std::tr1::unordered_map<Key, osg::ref_ptr<Effect>,
+                                    boost::hash<Key>, Key::EqualTo> Cache;
     Cache* getCache()
     {
         if (!_cache)