Use prefix ++ operators for non-primitive types

Prevent unnecessary calls to copy constructor
Found by Cppcheck (postfixOperator)
This commit is contained in:
Christoph Grüninger committed 2024-02-14 20:46:02 +01:00
1 parent 95a9494974
commit 3850def5e6
1 file changed
+1 -1
+1 -1
View File
@@ -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,