Mentions légales du service

Skip to content
Snippets Groups Projects

Fix display of variable lines with no variation or with invalid values

Merged Philippe SWARTVAGHER requested to merge pswartva/vite:fix-variable-line into master
2 files
+ 15
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
0
@@ -57,6 +57,11 @@
using namespace std;
bool convert_to_double(const std::string &arg, double *val) {
if (arg.compare("-nan") == 0 || arg.compare("nan") == 0 || arg.compare("inf") == 0) {
*val = 0;
return true;
}
int nb_read;
// Try to convert first in the current locale
sscanf(arg.c_str(), "%lf%n", val, &nb_read);
Loading