#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>
// 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)