Explorar el Código

COMP: Fix const set find for Borland 5.5

The Borland 5.5 compiler's STL set does not define correct signatures
for its find() members, leading to build errors.  This works around the
problem.
Brad King hace 17 años
padre
commit
e92d99d05c

+ 2 - 1
Source/CTest/cmCTestSubmitHandler.cxx

@@ -1128,6 +1128,7 @@ void cmCTestSubmitHandler::SelectParts(std::set<cmCTest::Part> const& parts)
   for(cmCTest::Part p = cmCTest::PartStart;
       p != cmCTest::PartCount; p = cmCTest::Part(p+1))
     {
-    this->SubmitPart[p] = (parts.find(p) != parts.end());
+    this->SubmitPart[p] =
+      (std::set<cmCTest::Part>::const_iterator(parts.find(p)) != parts.end());
     }
 }

+ 4 - 2
Source/cmExtraEclipseCDT4Generator.cxx

@@ -648,8 +648,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
         case cmTarget::GLOBAL_TARGET:
           {
           bool insertTarget = true;
-          if(insertTarget && (this->TargetsToIgnore.find(t->first) != 
-                                                  this->TargetsToIgnore.end()))
+          if(insertTarget &&
+             (std::set<std::string>::const_iterator(
+               this->TargetsToIgnore.find(t->first)) !=
+              this->TargetsToIgnore.end()))
             {
             insertTarget = false;
             }