mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-01 17:08:31 -04:00
fix: Resolve compilation issues with fmt library and formatters
Fix multiple compilation errors preventing successful build: * Add const qualifier to custom fmt formatter functions across codebase - Updated formatters in logging, shader recompiler, texture cache, and other modules - Ensures compatibility with newer fmt library versions * Add missing fmt/ranges.h includes for fmt::join usage - Fixed fmt::join calls in Vulkan renderer, GDB stub, NFC service, and main window - Resolves "no member named 'join' in namespace 'fmt'" errors * Exclude unsupported platforms from Boost.Process usage in debugger - Extended conditional compilation to avoid Boost.Process where unavailable * Fix type casting issues in AOC service manager - Resolved std::min type mismatch with explicit casting
This commit is contained in:
@@ -22,7 +22,7 @@ struct fmt::formatter<Dynarmic::A32::CoprocReg> {
|
||||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) {
|
||||
auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "cp{}", static_cast<size_t>(reg));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <thread>
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#ifndef __ANDROID__
|
||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
||||
#include <boost/process/async_pipe.hpp>
|
||||
#endif
|
||||
|
||||
@@ -161,10 +161,10 @@ private:
|
||||
// Set the new state. This will tear down any existing state.
|
||||
state = ConnectionState{
|
||||
.client_socket{std::move(peer)},
|
||||
#ifndef __ANDROID__
|
||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
||||
.signal_pipe{io_context},
|
||||
#else
|
||||
// Use a regular socket pair for Android
|
||||
// Use a regular socket pair for Android and macOS
|
||||
.signal_pipe{io_context},
|
||||
#endif
|
||||
.info{},
|
||||
@@ -333,10 +333,10 @@ private:
|
||||
|
||||
struct ConnectionState {
|
||||
boost::asio::ip::tcp::socket client_socket;
|
||||
#ifndef __ANDROID__
|
||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
||||
boost::process::async_pipe signal_pipe;
|
||||
#else
|
||||
// Use a regular socket pair for Android
|
||||
// Use a regular socket pair for Android and macOS
|
||||
boost::asio::ip::tcp::socket signal_pipe;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "common/hex_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/scope_exit.h"
|
||||
|
||||
@@ -76,7 +76,7 @@ Result IAsyncData::Read(OutBuffer<BufferAttr_HipcMapAlias> out_buffer, u64 offse
|
||||
}
|
||||
|
||||
const u64 read_size = std::min(size, static_cast<u64>(data_buffer.size() - offset));
|
||||
const u64 copy_size = std::min(read_size, out_buffer.size());
|
||||
const u64 copy_size = std::min(read_size, static_cast<u64>(out_buffer.size()));
|
||||
|
||||
std::memcpy(out_buffer.data(), data_buffer.data() + offset, copy_size);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#endif
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "common/fs/file.h"
|
||||
#include "common/fs/fs.h"
|
||||
|
||||
@@ -167,7 +167,7 @@ constexpr inline Result GetSpanBetweenTimePoints(s64* out_seconds, const SteadyC
|
||||
template <>
|
||||
struct fmt::formatter<Service::PSC::Time::TimeType> : fmt::formatter<fmt::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) {
|
||||
auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) const {
|
||||
const string_view name = [type] {
|
||||
using Service::PSC::Time::TimeType;
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user