With reference to Bug 679, this commit integrates part of the patch proposed, and...
authorCristian Mattarei <cristian.mattarei@gmail.com>
Mon, 9 Jan 2017 03:00:09 +0000 (19:00 -0800)
committerCristian Mattarei <cristian.mattarei@gmail.com>
Mon, 9 Jan 2017 03:00:09 +0000 (19:00 -0800)
The compilation issue in Bug 679 does not apply anymore with gcc6.3.1

src/main/command_executor.cpp

index 64025fc0468c4f115d4c47163cf0f1e997e6c71b..ebb57da74328fc80580115ca0ebacf894932a2ca 100644 (file)
@@ -254,7 +254,9 @@ void CommandExecutor::printStatsFilterZeros(std::ostream& out,
     std::getline(iss, statValue, '\n');
 
     double curFloat;
-    bool isFloat = static_cast<bool>(std::istringstream(statValue) >> curFloat);
+    std::istringstream iss_stat_value (statValue);
+    iss_stat_value >> curFloat;
+    bool isFloat = iss_stat_value.good();
 
     if( (isFloat && curFloat == 0) ||
         statValue == " \"0\"" ||