Fix cache for non void* types
This commit is contained in:
parent
1b4171c5e4
commit
7fb39f7e3b
|
@ -36,7 +36,7 @@ public:
|
||||||
static cmDynamicLoaderCache* GetInstance();
|
static cmDynamicLoaderCache* GetInstance();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<std::string, void*> m_CacheMap;
|
std::map<std::string, cmLibHandle> m_CacheMap;
|
||||||
static cmDynamicLoaderCache* Instance;
|
static cmDynamicLoaderCache* Instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ void cmDynamicLoaderCache::CacheFile(const char* path, const cmLibHandle& p)
|
||||||
|
|
||||||
bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
|
bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
|
||||||
{
|
{
|
||||||
std::map<std::string, void*>::iterator it = m_CacheMap.find(path);
|
std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.find(path);
|
||||||
if ( it != m_CacheMap.end() )
|
if ( it != m_CacheMap.end() )
|
||||||
{
|
{
|
||||||
p = it->second;
|
p = it->second;
|
||||||
|
@ -70,7 +70,7 @@ bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
|
||||||
|
|
||||||
bool cmDynamicLoaderCache::FlushCache(const char* path)
|
bool cmDynamicLoaderCache::FlushCache(const char* path)
|
||||||
{
|
{
|
||||||
std::map<std::string, void*>::iterator it = m_CacheMap.find(path);
|
std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.find(path);
|
||||||
if ( it != m_CacheMap.end() )
|
if ( it != m_CacheMap.end() )
|
||||||
{
|
{
|
||||||
cmDynamicLoader::CloseLibrary(it->second);
|
cmDynamicLoader::CloseLibrary(it->second);
|
||||||
|
@ -82,7 +82,7 @@ bool cmDynamicLoaderCache::FlushCache(const char* path)
|
||||||
|
|
||||||
void cmDynamicLoaderCache::FlushCache()
|
void cmDynamicLoaderCache::FlushCache()
|
||||||
{
|
{
|
||||||
for ( std::map<std::string, void*>::iterator it = m_CacheMap.begin();
|
for ( std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.begin();
|
||||||
it != m_CacheMap.end(); it++ )
|
it != m_CacheMap.end(); it++ )
|
||||||
{
|
{
|
||||||
cmDynamicLoader::CloseLibrary(it->second);
|
cmDynamicLoader::CloseLibrary(it->second);
|
||||||
|
|
Loading…
Reference in New Issue