@@ -229,7 +229,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
229229 }
230230
231231 else if (std::strncmp (argv[i], " --suppress=" , 11 ) == 0 ) {
232- std::string suppression = argv[i]+11 ;
232+ const std::string suppression = argv[i]+11 ;
233233 const std::string errmsg (_settings->nomsg .addSuppressionLine (suppression));
234234 if (!errmsg.empty ()) {
235235 PrintMessage (errmsg);
@@ -257,7 +257,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
257257 if (argv[i][argv[i][3 ]==' =' ?4 :17 ] != 0 ) {
258258 std::string paths = argv[i]+(argv[i][3 ]==' =' ?4 :17 );
259259 for (;;) {
260- std::string::size_type pos = paths.find (' ;' );
260+ const std::string::size_type pos = paths.find (' ;' );
261261 if (pos == std::string::npos) {
262262 _settings->basePaths .push_back (Path::fromNativeSeparators (paths));
263263 break ;
@@ -291,7 +291,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
291291
292292 // Define the XML file version (and enable XML output)
293293 else if (std::strncmp (argv[i], " --xml-version=" , 14 ) == 0 ) {
294- std::string numberString (argv[i]+14 );
294+ const std::string numberString (argv[i]+14 );
295295
296296 std::istringstream iss (numberString);
297297 if (!(iss >> _settings->xml_version )) {
@@ -339,7 +339,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
339339
340340 // --error-exitcode=1
341341 else if (std::strncmp (argv[i], " --error-exitcode=" , 17 ) == 0 ) {
342- std::string temp = argv[i]+17 ;
342+ const std::string temp = argv[i]+17 ;
343343 std::istringstream iss (temp);
344344 if (!(iss >> _settings->exitCode )) {
345345 _settings->exitCode = 0 ;
@@ -698,7 +698,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
698698
699699 // Specify platform
700700 else if (std::strncmp (argv[i], " --platform=" , 11 ) == 0 ) {
701- std::string platform (11 +argv[i]);
701+ const std::string platform (11 +argv[i]);
702702
703703 if (platform == " win32A" )
704704 _settings->platform (Settings::Win32A);
0 commit comments