Changeset - r26958:e418be5dc8a5
[Not reviewed]
master
0 1 0
glx22 - 16 months ago 2023-02-09 18:28:50
glx@openttd.org
Codechange: Use {fmt} for script_admin JSON generation
1 file changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_admin.cpp
Show inline comments
 
@@ -28,9 +28,7 @@
 
			SQInteger res;
 
			sq_getinteger(vm, index, &res);
 

	
 
			char buf[10];
 
			seprintf(buf, lastof(buf), "%d", (int32)res);
 
			data = buf;
 
			data = fmt::format("{}", res);
 
			return true;
 
		}
 

	
 
@@ -44,7 +42,7 @@
 
				return false;
 
			}
 

	
 
			data = std::string("\"") + buf + "\"";
 
			data = fmt::format("\"{}\"", buf);
 
			return true;
 
		}
 

	
0 comments (0 inline, 0 general)