You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/flamegpu/io/JSONStateReader.cu
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -219,14 +219,17 @@ class JSONStateReader_impl : public nlohmann::json_sax<nlohmann::json> {
219
219
mode.pop();
220
220
is_array = true;
221
221
}
222
-
if (mode.top() == Environment) {
223
-
fprintf(stderr, "Warning: JSON Environment property '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", lastKey.c_str());
224
-
} elseif (mode.top() == MacroEnvironment) {
225
-
fprintf(stderr, "Warning: JSON MacroEnvironment property '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", lastKey.c_str());
226
-
} elseif (mode.top() == AgentInstance) {
227
-
fprintf(stderr, "Warning: JSON Agent '%s' variable '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", current_agent.c_str(), lastKey.c_str());
228
-
} else {
229
-
fprintf(stderr, "Warning: JSON state item '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", lastKey.c_str());
222
+
// Emit a warning if the verbosity level is high enough
223
+
if (verbosity > Verbosity::Quiet) {
224
+
if (mode.top() == Environment) {
225
+
fprintf(stderr, "Warning: JSON Environment property '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", lastKey.c_str());
226
+
} elseif (mode.top() == MacroEnvironment) {
227
+
fprintf(stderr, "Warning: JSON MacroEnvironment property '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", lastKey.c_str());
228
+
} elseif (mode.top() == AgentInstance) {
229
+
fprintf(stderr, "Warning: JSON Agent '%s' variable '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", current_agent.c_str(), lastKey.c_str());
230
+
} else {
231
+
fprintf(stderr, "Warning: JSON state item '%s' contains NULL, this has been interpreted as NaN (but may represent Inf).\n", lastKey.c_str());
0 commit comments