From 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:23:44 +1000 Subject: The Formatting String Catastrophe --- source/windowing/StarKeyBindings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/windowing/StarKeyBindings.cpp') diff --git a/source/windowing/StarKeyBindings.cpp b/source/windowing/StarKeyBindings.cpp index e93a1af..969a766 100644 --- a/source/windowing/StarKeyBindings.cpp +++ b/source/windowing/StarKeyBindings.cpp @@ -107,10 +107,10 @@ KeyChord inputDescriptorFromJson(Json const& json) { } else if (value.canConvert(Json::Type::Int)) { key = (Key)value.toUInt(); } else { - throw StarException::format("Improper key value '%s'", value); + throw StarException::format("Improper key value '{}'", value); } } else { - throw StarException::format("Improper bindings type '%s'", type); + throw StarException::format("Improper bindings type '{}'", type); } KeyMod mods = KeyMod::NoMod; @@ -156,7 +156,7 @@ KeyBindings::KeyBindings(Json const& json) { auto chord = inputDescriptorFromJson(input); actions[chord.key].append({chord.mods, action}); } catch (StarException const& e) { - Logger::warn("Could not load keybinding for %s: %s\n", + Logger::warn("Could not load keybinding for {}: {}\n", InterfaceActionNames.getRight(action), outputException(e, false)); } @@ -165,7 +165,7 @@ KeyBindings::KeyBindings(Json const& json) { m_actions = move(actions); } catch (StarException const& e) { - throw StarException(strf("Could not set keybindings from configuration. %s", outputException(e, false))); + throw StarException(strf("Could not set keybindings from configuration. {}", outputException(e, false))); } } -- cgit v1.2.3