Przeglądaj źródła

cmCommandArgumentsHelper: simplify boolean expression

Daniel Pfeifer 9 lat temu
rodzic
commit
7b94a7adb3
1 zmienionych plików z 1 dodań i 8 usunięć
  1. 1 8
      Source/cmCommandArgumentsHelper.cxx

+ 1 - 8
Source/cmCommandArgumentsHelper.cxx

@@ -57,14 +57,7 @@ bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const
   if (this->ArgumentsBeforeEmpty) {
     return true;
   }
-
-  std::set<const cmCommandArgument*>::const_iterator argIt =
-    this->ArgumentsBefore.find(current);
-  if (argIt != this->ArgumentsBefore.end()) {
-    return true;
-  }
-
-  return false;
+  return this->ArgumentsBefore.find(current) != this->ArgumentsBefore.end();
 }
 
 bool cmCommandArgument::KeyMatches(const std::string& key) const