mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 10:40:09 -06:00
Remove fmt::format and replace with std::format
This commit is contained in:
@@ -378,12 +378,12 @@ TestResult InListVerifier<T>::operator()(const ghoul::Dictionary& dict,
|
||||
std::string list = std::accumulate(
|
||||
values.begin() + 1,
|
||||
values.end(),
|
||||
fmt::format("{}", values.front()),
|
||||
std::format("{}", values.front()),
|
||||
[](std::string lhs, typename T::Type rhs) {
|
||||
return fmt::format("{}, {}", lhs, rhs);
|
||||
return std::format("{}, {}", lhs, rhs);
|
||||
}
|
||||
);
|
||||
o.explanation = fmt::format(
|
||||
o.explanation = std::format(
|
||||
"'{}' not in list of accepted values '{}'",
|
||||
key, list
|
||||
);
|
||||
|
||||
@@ -196,7 +196,7 @@ from_string(std::string_view string)
|
||||
if (string == "Pan Y") { return T::PanY; }
|
||||
if (string == "Property") { return T::Property; }
|
||||
|
||||
throw RuntimeError(fmt::format("Unknown axis type '{}'", string), "Joystick");
|
||||
throw RuntimeError(std::format("Unknown axis type '{}'", string), "Joystick");
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -220,7 +220,7 @@ from_string(std::string_view string)
|
||||
if (string == "JoystickLike") { return T::JoystickLike; }
|
||||
if (string == "TriggerLike") { return T::TriggerLike; }
|
||||
|
||||
throw RuntimeError(fmt::format("Unknown joystick type '{}'", string), "Joystick");
|
||||
throw RuntimeError(std::format("Unknown joystick type '{}'", string), "Joystick");
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -150,7 +150,7 @@ constexpr openspace::interaction::JoystickAction from_string(std::string_view st
|
||||
if (string == "Repeat") { return openspace::interaction::JoystickAction::Repeat; }
|
||||
if (string == "Release") { return openspace::interaction::JoystickAction::Release; }
|
||||
|
||||
throw RuntimeError(fmt::format("Unknown action '{}'", string));
|
||||
throw RuntimeError(std::format("Unknown action '{}'", string));
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -407,7 +407,7 @@ struct ScriptMessage {
|
||||
if (buffer.size() != (sizeof(uint32_t) + len)) {
|
||||
LERRORC(
|
||||
"ParallelPeer",
|
||||
fmt::format(
|
||||
std::format(
|
||||
"Received buffer with wrong size. Expected {} got {}",
|
||||
len, buffer.size()
|
||||
)
|
||||
|
||||
@@ -110,7 +110,7 @@ void NumericalProperty<T>::setExponent(float exponent) {
|
||||
if (!isValidRange(_minimumValue, _maximumValue)) {
|
||||
LWARNINGC(
|
||||
"NumericalProperty: setExponent",
|
||||
fmt::format(
|
||||
std::format(
|
||||
"Setting exponent for properties with negative values in "
|
||||
"[min, max] range is not yet supported. Property: {}",
|
||||
this->fullyQualifiedIdentifier()
|
||||
|
||||
@@ -76,7 +76,7 @@ std::string formatJson(T value) {
|
||||
values += std::to_string(value[i]) + ',';
|
||||
}
|
||||
values.pop_back();
|
||||
return fmt::format("[{}]", values);
|
||||
return std::format("[{}]", values);
|
||||
}
|
||||
else if constexpr (internal::isGlmMatrix<T>()) {
|
||||
std::string values;
|
||||
@@ -86,7 +86,7 @@ std::string formatJson(T value) {
|
||||
}
|
||||
}
|
||||
values.pop_back();
|
||||
return fmt::format("[{}]", values);
|
||||
return std::format("[{}]", values);
|
||||
}
|
||||
else {
|
||||
static_assert(sizeof(T) == 0, "JSON formatting of type T not implemented");
|
||||
|
||||
@@ -578,7 +578,7 @@ public:
|
||||
|
||||
timout_c(ephemerisTime, format, bufferSize, outBuf);
|
||||
if (failed_c()) {
|
||||
throwSpiceError(fmt::format(
|
||||
throwSpiceError(std::format(
|
||||
"Error converting ephemeris time '{}' to date with format '{}'",
|
||||
ephemerisTime, format
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user