From c9522fb740200ccef6230cec452c48efb31e5394 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 11 May 2023 22:05:17 +0200 Subject: Removed all Printf-family functions from StringUtils. Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments. Also fixed code-style violations already present in the code. --- src/Bindings/PluginLua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Bindings/PluginLua.cpp') diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp index caa02acf9..41e2e14f7 100644 --- a/src/Bindings/PluginLua.cpp +++ b/src/Bindings/PluginLua.cpp @@ -34,7 +34,7 @@ cPluginLua::cPluginLua(const AString & a_PluginDirectory, cDeadlockDetect & a_DeadlockDetect) : cPlugin(a_PluginDirectory), - m_LuaState(Printf("plugin %s", a_PluginDirectory.c_str())), + m_LuaState(fmt::format(FMT_STRING("plugin {}"), a_PluginDirectory)), m_DeadlockDetect(a_DeadlockDetect) { m_LuaState.TrackInDeadlockDetect(a_DeadlockDetect); @@ -140,7 +140,7 @@ bool cPluginLua::Load(void) AString Path = PluginPath + *itr; if (!m_LuaState.LoadFile(Path)) { - SetLoadError(Printf("Failed to load file %s.", itr->c_str())); + SetLoadError(fmt::format(FMT_STRING("Failed to load file {}."), *itr)); Close(); return false; } -- cgit v1.2.3