mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -7,6 +7,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/MathUtil.h"
|
||||
@ -287,7 +288,7 @@ void ReshapableInput::SaveConfig(Common::IniFile::Section* section,
|
||||
std::transform(
|
||||
m_calibration.begin(), m_calibration.end(), save_data.begin(),
|
||||
[](ControlState val) { return fmt::format("{:.2f}", val * CALIBRATION_CONFIG_SCALE); });
|
||||
section->Set(group + CALIBRATION_CONFIG_NAME, JoinStrings(save_data, " "), "");
|
||||
section->Set(group + CALIBRATION_CONFIG_NAME, fmt::to_string(fmt::join(save_data, " ")), "");
|
||||
|
||||
// Save center value.
|
||||
static constexpr char center_format[] = "{:.2f} {:.2f}";
|
||||
|
Reference in New Issue
Block a user