cmTarget: Clean up the InsertCompileDefinition implementation.

It accepts a before parameter but is never called with before=true.

compile definitions are sorted by std::set, so it wouldn't make sense
to allow user sorting.
This commit is contained in:
Stephen Kelly 2014-02-02 22:09:55 +01:00
parent cd711ed052
commit dcd443d4aa
2 changed files with 3 additions and 9 deletions

View File

@ -1620,16 +1620,11 @@ void cmTarget::InsertCompileOption(const cmValueWithOrigin &entry,
}
//----------------------------------------------------------------------------
void cmTarget::InsertCompileDefinition(const cmValueWithOrigin &entry,
bool before)
void cmTarget::InsertCompileDefinition(const cmValueWithOrigin &entry)
{
cmGeneratorExpression ge(entry.Backtrace);
std::vector<cmTargetInternals::TargetPropertyEntry*>::iterator position
= before ? this->Internal->CompileDefinitionsEntries.begin()
: this->Internal->CompileDefinitionsEntries.end();
this->Internal->CompileDefinitionsEntries.insert(position,
this->Internal->CompileDefinitionsEntries.push_back(
new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry.Value)));
}

View File

@ -531,8 +531,7 @@ public:
bool before = false);
void InsertCompileOption(const cmValueWithOrigin &entry,
bool before = false);
void InsertCompileDefinition(const cmValueWithOrigin &entry,
bool before = false);
void InsertCompileDefinition(const cmValueWithOrigin &entry);
void AppendBuildInterfaceIncludes();