mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpiutil] Upgrade to fmt 9.0.0 (#4337)
fmt removed fmt::make_args_checked since it's no longer needed for constexpr format string checks. fmt deprecated implicit conversions from enums to integers in format arguments, so I added explicit static casts.
This commit is contained in:
@@ -34,12 +34,12 @@ class WPILIB_DLLEXPORT MathShared {
|
||||
|
||||
template <typename S, typename... Args>
|
||||
inline void ReportError(const S& format, Args&&... args) {
|
||||
ReportErrorV(format, fmt::make_args_checked<Args...>(format, args...));
|
||||
ReportErrorV(format, fmt::make_format_args(args...));
|
||||
}
|
||||
|
||||
template <typename S, typename... Args>
|
||||
inline void ReportWarning(const S& format, Args&&... args) {
|
||||
ReportWarningV(format, fmt::make_args_checked<Args...>(format, args...));
|
||||
ReportWarningV(format, fmt::make_format_args(args...));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ class WPILIB_DLLEXPORT MathSharedStore {
|
||||
|
||||
template <typename S, typename... Args>
|
||||
static inline void ReportError(const S& format, Args&&... args) {
|
||||
ReportErrorV(format, fmt::make_args_checked<Args...>(format, args...));
|
||||
ReportErrorV(format, fmt::make_format_args(args...));
|
||||
}
|
||||
|
||||
static void ReportWarningV(fmt::string_view format, fmt::format_args args) {
|
||||
@@ -64,7 +64,7 @@ class WPILIB_DLLEXPORT MathSharedStore {
|
||||
|
||||
template <typename S, typename... Args>
|
||||
static inline void ReportWarning(const S& format, Args&&... args) {
|
||||
ReportWarningV(format, fmt::make_args_checked<Args...>(format, args...));
|
||||
ReportWarningV(format, fmt::make_format_args(args...));
|
||||
}
|
||||
|
||||
static void ReportUsage(MathUsageId id, int count) {
|
||||
|
||||
Reference in New Issue
Block a user