Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarCommandProcessor.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-09-16 23:02:22 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-09-16 23:02:22 +1000
commit090441b80aed3c7df45ff1a6d40ed56ee895ad28 (patch)
tree3a4a8137941aa60f0674d9ed9308a45266c96e4e /source/game/StarCommandProcessor.cpp
parent40299558dd4585adb6066cdade5703be7cf10b76 (diff)
make lexical casts (string -> int/float) faster
Diffstat (limited to 'source/game/StarCommandProcessor.cpp')
-rw-r--r--source/game/StarCommandProcessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/game/StarCommandProcessor.cpp b/source/game/StarCommandProcessor.cpp
index 7b6915e..74fc33a 100644
--- a/source/game/StarCommandProcessor.cpp
+++ b/source/game/StarCommandProcessor.cpp
@@ -262,7 +262,7 @@ String CommandProcessor::setTileProtection(ConnectionId connectionId, String con
return "Not enough arguments to /settileprotection. Use /settileprotection <dungeonId> <protected>";
try {
- bool isProtected = lexicalCast<bool>(arguments.takeLast());
+ bool isProtected = Json::parse(arguments.takeLast()).toBool();
List<DungeonId> dungeonIds;
for (auto& banana : arguments) {
auto slices = banana.split("..");