mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 01:15:35 +00:00
Use std::string for ResourceManager cache key
Otherwise terrain textures cache has zero hits because it stores not normalized paths. Due to implicit conversion it's possible to add entry with addEntryToObjectCache passing a string that is converted into normalized path. But then getRefFromObjectCache called with original value does not find this entry because it's not converted and overloaded operators are used instead.
This commit is contained in:
parent
2a41811c83
commit
16410d0960
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ namespace Resource
|
|||
Nif::Reader reader(*file, mEncoder);
|
||||
reader.parse(mVFS->get(name));
|
||||
obj = new NifFileHolder(file);
|
||||
mCache->addEntryToObjectCache(name, obj);
|
||||
mCache->addEntryToObjectCache(name.value(), obj);
|
||||
return file;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace Resource
|
|||
double mExpiryDelay;
|
||||
};
|
||||
|
||||
class ResourceManager : public GenericResourceManager<VFS::Path::Normalized>
|
||||
class ResourceManager : public GenericResourceManager<std::string>
|
||||
{
|
||||
public:
|
||||
explicit ResourceManager(const VFS::Manager* vfs, double expiryDelay)
|
||||
|
|
Loading…
Reference in a new issue