diff --git a/hal/src/main/native/athena/FRCDriverStation.cpp b/hal/src/main/native/athena/FRCDriverStation.cpp index bce631ff54..3d5f207aa9 100644 --- a/hal/src/main/native/athena/FRCDriverStation.cpp +++ b/hal/src/main/native/athena/FRCDriverStation.cpp @@ -204,12 +204,12 @@ int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, if (printMsg) { fmt::memory_buffer buf; if (location && location[0] != '\0') { - fmt::format_to(buf, "{} at {}: ", isError ? "Error" : "Warning", - location); + fmt::format_to(fmt::appender{buf}, + "{} at {}: ", isError ? "Error" : "Warning", location); } - fmt::format_to(buf, "{}\n", details); + fmt::format_to(fmt::appender{buf}, "{}\n", details); if (callStack && callStack[0] != '\0') { - fmt::format_to(buf, "{}\n", callStack); + fmt::format_to(fmt::appender{buf}, "{}\n", callStack); } std::fwrite(buf.data(), buf.size(), 1, stderr); } diff --git a/hal/src/main/native/sim/DriverStation.cpp b/hal/src/main/native/sim/DriverStation.cpp index d02319f93f..723cdacfa8 100644 --- a/hal/src/main/native/sim/DriverStation.cpp +++ b/hal/src/main/native/sim/DriverStation.cpp @@ -85,12 +85,12 @@ int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, if (printMsg) { fmt::memory_buffer buf; if (location && location[0] != '\0') { - fmt::format_to(buf, "{} at {}: ", isError ? "Error" : "Warning", - location); + fmt::format_to(fmt::appender{buf}, + "{} at {}: ", isError ? "Error" : "Warning", location); } - fmt::format_to(buf, "{}\n", details); + fmt::format_to(fmt::appender{buf}, "{}\n", details); if (callStack && callStack[0] != '\0') { - fmt::format_to(buf, "{}\n", callStack); + fmt::format_to(fmt::appender{buf}, "{}\n", callStack); } std::fwrite(buf.data(), buf.size(), 1, stderr); } diff --git a/ntcore/src/main/native/cpp/networktables/NetworkTable.cpp b/ntcore/src/main/native/cpp/networktables/NetworkTable.cpp index 017d0af2ed..cc519f5bad 100644 --- a/ntcore/src/main/native/cpp/networktables/NetworkTable.cpp +++ b/ntcore/src/main/native/cpp/networktables/NetworkTable.cpp @@ -93,7 +93,7 @@ NetworkTableEntry NetworkTable::GetEntry(std::string_view key) const { NT_Entry& entry = m_entries[key]; if (entry == 0) { fmt::memory_buffer buf; - fmt::format_to(buf, "{}/{}", m_path, key); + fmt::format_to(fmt::appender{buf}, "{}/{}", m_path, key); entry = nt::GetEntry(m_inst, {buf.data(), buf.size()}); } return NetworkTableEntry{entry}; diff --git a/wpilibc/src/main/native/cpp/Notifier.cpp b/wpilibc/src/main/native/cpp/Notifier.cpp index df6e488482..441f7507c8 100644 --- a/wpilibc/src/main/native/cpp/Notifier.cpp +++ b/wpilibc/src/main/native/cpp/Notifier.cpp @@ -140,7 +140,7 @@ Notifier& Notifier::operator=(Notifier&& rhs) { void Notifier::SetName(std::string_view name) { fmt::memory_buffer buf; - fmt::format_to(buf, "{}", name); + fmt::format_to(fmt::appender{buf}, "{}", name); buf.push_back('\0'); // null terminate int32_t status = 0; HAL_SetNotifierName(m_notifier, buf.data(), &status);