numeric setting value display fix
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ class Reader : public BasicParser {
|
|||||||
} else if (identifier == "inf") {
|
} else if (identifier == "inf") {
|
||||||
handler.setValue(name, *dynamic::Value::of(INFINITY));
|
handler.setValue(name, *dynamic::Value::of(INFINITY));
|
||||||
} else if (identifier == "nan") {
|
} else if (identifier == "nan") {
|
||||||
handler.setValue(name, *dynamic::Value::of(NAN));
|
handler.setValue(name, *dynamic::Value::of(NAN));
|
||||||
}
|
}
|
||||||
} else if (c == '"' || c == '\'') {
|
} else if (c == '"' || c == '\'') {
|
||||||
pos++;
|
pos++;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "setting.h"
|
#include "setting.hpp"
|
||||||
|
|
||||||
#include "../util/stringutil.h"
|
#include "../util/stringutil.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "data/setting.h"
|
#include "data/setting.hpp"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "command_line.h"
|
#include "command_line.hpp"
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef UTIL_COMMAND_LINE_H_
|
#ifndef UTIL_COMMAND_LINE_HPP_
|
||||||
#define UTIL_COMMAND_LINE_H_
|
#define UTIL_COMMAND_LINE_HPP_
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* @return false if engine start can*/
|
/// @return false if engine start can
|
||||||
extern bool parse_cmdline(int argc, char** argv, EnginePaths& paths);
|
bool parse_cmdline(int argc, char** argv, EnginePaths& paths);
|
||||||
|
|
||||||
#endif // UTIL_COMMAND_LINE_H_
|
#endif // UTIL_COMMAND_LINE_HPP_
|
||||||
@@ -197,6 +197,7 @@ void util::trim(std::string &s) {
|
|||||||
|
|
||||||
std::string util::to_string(double x) {
|
std::string util::to_string(double x) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
ss << std::setprecision(6);
|
||||||
ss << x;
|
ss << x;
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
#include "files/settings_io.hpp"
|
#include "files/settings_io.hpp"
|
||||||
#include "files/engine_paths.h"
|
#include "files/engine_paths.h"
|
||||||
#include "util/platform.h"
|
#include "util/platform.h"
|
||||||
#include "util/command_line.h"
|
#include "util/command_line.hpp"
|
||||||
#include "debug/Logger.hpp"
|
#include "debug/Logger.hpp"
|
||||||
|
|
||||||
#define SETTINGS_FILE "settings.toml"
|
inline std::string SETTINGS_FILE = "settings.toml";
|
||||||
#define CONTROLS_FILE "controls.json"
|
inline std::string CONTROLS_FILE = "controls.json";
|
||||||
|
|
||||||
static debug::Logger logger("main");
|
static debug::Logger logger("main");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user