Pārlūkot izejas kodu

Merge topic 'minor-cleanups'

dcd443d4 cmTarget: Clean up the InsertCompileDefinition implementation.
Brad King 12 gadi atpakaļ
vecāks
revīzija
e863496aca
2 mainītis faili ar 3 papildinājumiem un 9 dzēšanām
  1. 2 7
      Source/cmTarget.cxx
  2. 1 2
      Source/cmTarget.h

+ 2 - 7
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);
   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)));
       new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry.Value)));
 }
 }
 
 

+ 1 - 2
Source/cmTarget.h

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