summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-21 10:25:47 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-21 10:25:47 (GMT)
commitc021f59c1f2f3d892b621a9ba163b069f2a2f0a9 (patch)
treeaa49a9598baf779c7e5d8cb9dbc0f070e44ca0f8 /Source/cmMakefile.cxx
parent2d130896a05ef14f2ef53ed472c6926a85cc5399 (diff)
downloadCMake-c021f59c1f2f3d892b621a9ba163b069f2a2f0a9.zip
CMake-c021f59c1f2f3d892b621a9ba163b069f2a2f0a9.tar.gz
CMake-c021f59c1f2f3d892b621a9ba163b069f2a2f0a9.tar.bz2
cmMakefile: Store macro list in a vector not in a map.
The signature was computed (incorrectly) and stored as the map value, but never used. Remove it now.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx22
1 files changed, 6 insertions, 16 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ab0d60a..93b2ce6 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -143,7 +143,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->LocalGenerator = mf.LocalGenerator;
this->FunctionBlockers = mf.FunctionBlockers;
- this->MacrosMap = mf.MacrosMap;
+ this->MacrosList = mf.MacrosList;
this->SubDirectoryOrder = mf.SubDirectoryOrder;
this->Properties = mf.Properties;
this->PreOrder = mf.PreOrder;
@@ -3739,26 +3739,16 @@ cmVariableWatch *cmMakefile::GetVariableWatch() const
}
#endif
-void cmMakefile::AddMacro(const char* name, const char* signature)
+void cmMakefile::AddMacro(const char* name)
{
- if ( !name || !signature )
- {
- return;
- }
- this->MacrosMap[name] = signature;
+ assert(name);
+ this->MacrosList.push_back(name);
}
void cmMakefile::GetListOfMacros(std::string& macros) const
{
- StringStringMap::const_iterator it;
- macros = "";
- const char* sep = "";
- for ( it = this->MacrosMap.begin(); it != this->MacrosMap.end(); ++it )
- {
- macros += sep;
- macros += it->first;
- sep = ";";
- }
+ assert(macros.empty());
+ macros = cmJoin(this->MacrosList, ";");
}
cmCacheManager *cmMakefile::GetCacheManager() const