Browse Source

Use prefix ++ operators for non-primitive types

Prevent unnecessary calls to copy constructor
Found by Cppcheck (postfixOperator)
Christoph Grüninger 1 year ago
parent
commit
3850def5e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/CPack/cmCPackGenerator.cxx

+ 1 - 1
Source/CPack/cmCPackGenerator.cxx

@@ -360,7 +360,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
       cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
       cmsys::Glob gl;
       std::string top = *it;
-      it++;
+      ++it;
       std::string subdir = *it;
       std::string findExpr = cmStrCat(top, "/*");
       cmCPackLogger(cmCPackLog::LOG_OUTPUT,