Patch up for the libfmt change and update to c++20.Patch up for the

libfmt change and update to c++20.
This commit is contained in:
David Given
2025-03-12 01:22:18 +01:00
parent f5adb89338
commit 0f763fe06b
6 changed files with 10 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ struct ErrorException
template <typename... Args>
[[noreturn]] inline void error(fmt::string_view fstr, const Args&... args)
{
throw ErrorException{fmt::format(fstr, args...)};
throw ErrorException{fmt::format(fmt::runtime(fstr), args...)};
}
extern void warning(const std::string msg);
@@ -56,7 +56,7 @@ extern void warning(const std::string msg);
template <typename... Args>
inline void warning(fmt::string_view fstr, const Args&... args)
{
warning(fmt::format(fstr, args...));
warning(fmt::format(fmt::runtime(fstr), args...));
}
template <class... Ts>

View File

@@ -92,7 +92,7 @@ inline void log(const T& message)
template <typename... Args>
inline void log(fmt::string_view fstr, const Args&... args)
{
log(fmt::format(fstr, args...));
log(fmt::format(fmt::runtime(fstr), args...));
}
class LogRenderer

View File

@@ -111,11 +111,11 @@ private:
std::string sendrecv(const std::string& command)
{
if (_config.verbose())
fmt::print(fmt::format("> {}\n", command));
fmt::print("> {}\n", command);
_serial->writeLine(command);
auto r = _serial->readLine();
if (_config.verbose())
fmt::print(fmt::format("< {}\n", r));
fmt::print("< {}\n", r);
return r;
}
@@ -136,7 +136,7 @@ private:
doCommand(command);
std::string r = _serial->readLine();
if (_config.verbose())
fmt::print(fmt::format("<< {}\n", r));
fmt::print("<< {}\n", r);
return r;
}