summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmListFileCache.cxx20
-rw-r--r--Source/cmListFileCache.h3
2 files changed, 2 insertions, 21 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 2013fb4..1692fdc 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -25,14 +25,12 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
cmListFileFunction& function,
const char* filename);
-bool cmListFile::ParseFile(const char* path, bool requireProjectCommand)
+bool cmListFile::ParseFile(const char* filename, bool requireProjectCommand)
{
- if(!cmSystemTools::FileExists(path))
+ if(!cmSystemTools::FileExists(filename))
{
return false;
}
- // Get a pointer to a persistent copy of the name.
- const char* filename = this->GetUniqueStringPointer(path);
// Create the scanner.
cmListFileLexer* lexer = cmListFileLexer_New();
@@ -212,17 +210,3 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
return false;
}
-
-//----------------------------------------------------------------------------
-const char* cmListFile::GetUniqueStringPointer(const char* name)
-{
- UniqueStrings::iterator i = m_UniqueStrings.find(name);
- if(i == m_UniqueStrings.end())
- {
- char* str = new char[strlen(name)+1];
- strcpy(str, name);
- i = m_UniqueStrings.insert(UniqueStrings::value_type(name, str)).first;
- }
- return i->second;
-}
-
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index fc35c37..c36f562 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -65,9 +65,6 @@ struct cmListFile
bool ParseFile(const char* path, bool requireProjectCommand);
long int m_ModifiedTime;
std::vector<cmListFileFunction> m_Functions;
- typedef std::map<cmStdString, char*> UniqueStrings;
- UniqueStrings m_UniqueStrings;
- const char* GetUniqueStringPointer(const char* name);
};
#endif