StringUtil: Remove JoinStrings

With 12 uses of `JoinStrings` in the codebase vs 36 uses of `fmt::join`, fmtlib's range adapter for string concatenation with delimiters is clearly the preferred option.
This commit is contained in:
mitaclaw
2024-09-22 00:24:21 -07:00
parent de67c4c93b
commit 5f90673686
13 changed files with 29 additions and 38 deletions

View File

@ -3,6 +3,9 @@
#include "Core/FreeLookManager.h"
#include <fmt/format.h>
#include <fmt/ranges.h>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Config/Config.h"
@ -129,7 +132,7 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface)
#ifndef ANDROID
auto hotkey_string = [](std::vector<std::string> inputs) {
return "@(" + JoinStrings(inputs, "+") + ')';
return fmt::format("@({})", fmt::join(inputs, "+"));
};
m_move_buttons->SetControlExpression(MoveButtons::Up, hotkey_string({"Shift", "E"}));