mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-09 12:48:49 -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:
@@ -10,6 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "common/polyfill_ranges.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
template <>
|
||||
struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) {
|
||||
auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) const {
|
||||
using VideoCore::Surface::PixelFormat;
|
||||
const string_view name = [format] {
|
||||
switch (format) {
|
||||
@@ -234,7 +234,7 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
|
||||
template <>
|
||||
struct fmt::formatter<VideoCommon::ImageType> : fmt::formatter<fmt::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(VideoCommon::ImageType type, FormatContext& ctx) {
|
||||
auto format(VideoCommon::ImageType type, FormatContext& ctx) const {
|
||||
const string_view name = [type] {
|
||||
using VideoCommon::ImageType;
|
||||
switch (type) {
|
||||
@@ -262,7 +262,7 @@ struct fmt::formatter<VideoCommon::Extent3D> {
|
||||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) {
|
||||
auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{{{}, {}, {}}}", extent.width, extent.height,
|
||||
extent.depth);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user