mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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:
@@ -523,7 +523,8 @@ Image* Frame::GetImageImpl(int width, int height,
|
||||
|
||||
WPI_DEBUG4(Instance::GetInstance().logger,
|
||||
"converting image from {}x{} type {} to {}x{} type {}", cur->width,
|
||||
cur->height, cur->pixelFormat, width, height, pixelFormat);
|
||||
cur->height, static_cast<int>(cur->pixelFormat), width, height,
|
||||
static_cast<int>(pixelFormat));
|
||||
|
||||
// If the source image is a JPEG, we need to decode it before we can do
|
||||
// anything else with it. Note that if the destination format is JPEG, we
|
||||
|
||||
@@ -21,7 +21,7 @@ inline void NamedLog(wpi::Logger& logger, unsigned int level, const char* file,
|
||||
Args&&... args) {
|
||||
if (logger.HasLogger() && level >= logger.min_level()) {
|
||||
NamedLogV(logger, level, file, line, name, format,
|
||||
fmt::make_args_checked<Args...>(format, args...));
|
||||
fmt::make_format_args(args...));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ void MjpegServerImpl::ConnThread::SendJSON(wpi::raw_ostream& os,
|
||||
auto kind = source.GetPropertyKind(prop);
|
||||
fmt::print(os, "\n\"name\": \"{}\"", name);
|
||||
fmt::print(os, ",\n\"id\": \"{}\"", prop);
|
||||
fmt::print(os, ",\n\"type\": \"{}\"", kind);
|
||||
fmt::print(os, ",\n\"type\": \"{}\"", static_cast<int>(kind));
|
||||
fmt::print(os, ",\n\"min\": \"{}\"", source.GetPropertyMin(prop, &status));
|
||||
fmt::print(os, ",\n\"max\": \"{}\"", source.GetPropertyMax(prop, &status));
|
||||
fmt::print(os, ",\n\"step\": \"{}\"",
|
||||
|
||||
Reference in New Issue
Block a user