From dcd443d4aaf63c40e567a927b5be779f9be4b33e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 2 Feb 2014 22:09:55 +0100 Subject: 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. --- Source/cmTarget.cxx | 9 ++------- Source/cmTarget.h | 3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 21f8d4c..e51095e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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::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))); } diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ce0d812..271824b 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -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(); -- cgit v0.12