summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-developer.7.rst26
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx4
2 files changed, 1 insertions, 29 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index 2f98b02..a7abb4e 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -21,32 +21,6 @@ CMake is required to build with ancient C++ compilers and standard library
implementations. Some common C++ constructs may not be used in CMake in order
to build with such toolchains.
-std::set const iterators
-------------------------
-
-The ``find()`` member function of a ``const`` ``std::set`` instance may not be
-used in a comparison with the iterator returned by ``end()``:
-
-.. code-block:: c++
-
- const std::set<std::string>& someSet = getSet();
- if (someSet.find("needle") == someSet.end()) // Wrong
- {
- // ...
- }
-
-The return value of ``find()`` must be assigned to an intermediate
-``const_iterator`` for comparison:
-
-.. code-block:: c++
-
- const std::set<std::string>& someSet;
- const std::set<std::string>::const_iterator i = someSet.find("needle");
- if (i != propSet.end()) // Ok
- {
- // ...
- }
-
std::auto_ptr
-------------
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 75a84cb..a660bd4 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -66,9 +66,7 @@ cmGeneratorExpressionDAGChecker::Initialize()
if (it != top->Seen.end())
{
const std::set<std::string> &propSet = it->second;
- const std::set<std::string>::const_iterator i
- = propSet.find(this->Property);
- if (i != propSet.end())
+ if (propSet.find(this->Property) != propSet.end())
{
this->CheckResult = ALREADY_SEEN;
return;