Skip to content

Commit 2e0aca7

Browse files
committed
Remove std::format usage
1 parent 0758faf commit 2e0aca7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/game/client/components/tclient/scripting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class CScriptRunner : CComponentInterfaces
219219
return nullptr;
220220
return GameClient()->m_aClients[Id].m_aClan;
221221
}
222-
throw std::invalid_argument(std::format("No state with name {}", Str));
222+
throw std::string("No state with name '") + Str + std::string("'");
223223
}
224224

225225
public:

src/game/client/components/tclient/scripting/impl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <dispatchkit/bad_boxed_cast.hpp>
1010
#include <dispatchkit/boxed_cast.hpp>
1111
#include <dispatchkit/proxy_functions.hpp>
12-
#include <format>
1312
#include <variant>
1413

1514
#define CHAISCRIPT_NO_THREADS
@@ -55,7 +54,7 @@ static const char *ReadScript(IStorage *pStorage, const char *pFilename)
5554
const char *pScript;
5655
pScript = pStorage->ReadFileStr(pFilename, IStorage::TYPE_ALL);
5756
if(!pScript || !*pScript)
58-
throw std::format("Failed to open script '{}'", pFilename);
57+
throw std::string("Failed to open script '") + std::string(pFilename) + std::string("'");
5958
return pScript;
6059
}
6160

0 commit comments

Comments
 (0)