From 3850def5e61a3ab542286df748021ecb2fa055b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= Date: Wed, 14 Feb 2024 14:24:32 +0100 Subject: Use prefix ++ operators for non-primitive types Prevent unnecessary calls to copy constructor Found by Cppcheck (postfixOperator) --- Source/CPack/cmCPackGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 11d90c0..f0ea690 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/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, -- cgit v0.12