From 306494bd2d84625971f81167daf41a3d93018f46 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 29 Jun 2023 02:31:12 +1000 Subject: [PATCH] Unix fixes --- source/core/StarException.hpp | 3 +-- source/core/StarException_windows.cpp | 1 - source/core/StarString.cpp | 4 ---- source/core/StarString.hpp | 6 +++++- source/core/StarStringView.cpp | 6 +----- source/core/StarStringView.hpp | 6 +++++- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/source/core/StarException.hpp b/source/core/StarException.hpp index 0e6a4ed..87f0571 100644 --- a/source/core/StarException.hpp +++ b/source/core/StarException.hpp @@ -4,9 +4,8 @@ #include "StarMemory.hpp" #include "StarOutputProxy.hpp" - #include - +#include namespace Star { diff --git a/source/core/StarException_windows.cpp b/source/core/StarException_windows.cpp index 8f5786f..b40df12 100644 --- a/source/core/StarException_windows.cpp +++ b/source/core/StarException_windows.cpp @@ -5,7 +5,6 @@ #include "StarString_windows.hpp" #include -#include namespace Star { diff --git a/source/core/StarString.cpp b/source/core/StarString.cpp index 924c83b..86fea67 100644 --- a/source/core/StarString.cpp +++ b/source/core/StarString.cpp @@ -1136,7 +1136,3 @@ size_t hash::operator()(StringList const& sl) const { } } - -fmt::v10::appender fmt::formatter::format(Star::String const& s, format_context& ctx) const { - return formatter::format(s.utf8(), ctx); -}; diff --git a/source/core/StarString.hpp b/source/core/StarString.hpp index a401076..9ffe536 100644 --- a/source/core/StarString.hpp +++ b/source/core/StarString.hpp @@ -520,7 +520,11 @@ StringList StringList::sorted(Comparator&& comparator) const { } template <> struct fmt::formatter : formatter { - fmt::v10::appender format(Star::String const& s, format_context& ctx) const; + auto format(Star::String const& s, format_context& ctx) const; +}; + +auto fmt::formatter::format(Star::String const& s, format_context& ctx) const { + return formatter::format(s.utf8(), ctx); }; #endif diff --git a/source/core/StarStringView.cpp b/source/core/StarStringView.cpp index 8090515..fa62cf5 100644 --- a/source/core/StarStringView.cpp +++ b/source/core/StarStringView.cpp @@ -425,8 +425,4 @@ std::ostream& operator<<(std::ostream& os, StringView const& s) { return os; } -} - -fmt::v10::appender fmt::formatter::format(Star::StringView const& s, format_context& ctx) const { - return formatter::format(s.utf8(), ctx); -}; \ No newline at end of file +} \ No newline at end of file diff --git a/source/core/StarStringView.hpp b/source/core/StarStringView.hpp index 67d654e..9193de9 100644 --- a/source/core/StarStringView.hpp +++ b/source/core/StarStringView.hpp @@ -116,7 +116,11 @@ private: } template <> struct fmt::formatter : formatter { - fmt::v10::appender format(Star::StringView const& s, format_context& ctx) const; + auto format(Star::StringView const& s, format_context& ctx) const; +}; + +auto fmt::formatter::format(Star::StringView const& s, format_context& ctx) const { + return formatter::format(s.utf8(), ctx); }; #endif \ No newline at end of file