From 3b3ad0324a176c16454cdf00be2eedbbef219126 Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Wed, 11 Oct 2023 10:25:50 -0700 Subject: [PATCH] chore: update to reflect #157, formatting, collapse another namespace --- CommonLibSF/include/REL/ID.h | 2 +- CommonLibSF/include/REL/Version.h | 17 +++++++---------- CommonLibSF/src/REL/ID.cpp | 2 +- CommonLibSF/src/SFSE/API.cpp | 1 + CommonLibSF/src/SFSE/Interfaces.cpp | 1 + CommonLibSF/src/SFSE/Logger.cpp | 1 + 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CommonLibSF/include/REL/ID.h b/CommonLibSF/include/REL/ID.h index 50420422..3098b80f 100644 --- a/CommonLibSF/include/REL/ID.h +++ b/CommonLibSF/include/REL/ID.h @@ -78,7 +78,7 @@ namespace REL Offset2ID(std::execution::sequenced_policy{}) {} - [[nodiscard]] constexpr std::uint64_t operator()(std::size_t a_offset) const; + [[nodiscard]] std::uint64_t operator()(std::size_t a_offset) const; [[nodiscard]] constexpr const_iterator begin() const noexcept { return _offset2id.begin(); } diff --git a/CommonLibSF/include/REL/Version.h b/CommonLibSF/include/REL/Version.h index bae90f71..48d3c370 100644 --- a/CommonLibSF/include/REL/Version.h +++ b/CommonLibSF/include/REL/Version.h @@ -149,16 +149,13 @@ namespace REL } #ifdef __cpp_lib_format -namespace std +template +struct std::formatter : formatter { - template - struct formatter : formatter + template + constexpr auto format(const REL::Version a_version, FormatContext& a_ctx) const { - template - constexpr auto format(const REL::Version a_version, FormatContext& a_ctx) const - { - return formatter::format(a_version.string(), a_ctx); - } - }; -} + return formatter::format(a_version.string(), a_ctx); + } +}; #endif diff --git a/CommonLibSF/src/REL/ID.cpp b/CommonLibSF/src/REL/ID.cpp index a3be21de..38a3ecdc 100644 --- a/CommonLibSF/src/REL/ID.cpp +++ b/CommonLibSF/src/REL/ID.cpp @@ -6,7 +6,7 @@ namespace REL { constexpr auto LookUpDir = "Data\\SFSE\\Plugins"sv; - [[nodiscard]] constexpr std::uint64_t Offset2ID::operator()(std::size_t a_offset) const + [[nodiscard]] std::uint64_t Offset2ID::operator()(std::size_t a_offset) const { const mapping_t elem{ 0, a_offset }; const auto it = std::ranges::lower_bound( diff --git a/CommonLibSF/src/SFSE/API.cpp b/CommonLibSF/src/SFSE/API.cpp index 931f1e21..48044889 100644 --- a/CommonLibSF/src/SFSE/API.cpp +++ b/CommonLibSF/src/SFSE/API.cpp @@ -1,4 +1,5 @@ #include "SFSE/API.h" + #include "SFSE/Logger.h" namespace SFSE diff --git a/CommonLibSF/src/SFSE/Interfaces.cpp b/CommonLibSF/src/SFSE/Interfaces.cpp index 407d8017..79c71555 100644 --- a/CommonLibSF/src/SFSE/Interfaces.cpp +++ b/CommonLibSF/src/SFSE/Interfaces.cpp @@ -1,4 +1,5 @@ #include "SFSE/Interfaces.h" + #include "SFSE/API.h" #include "SFSE/Logger.h" diff --git a/CommonLibSF/src/SFSE/Logger.cpp b/CommonLibSF/src/SFSE/Logger.cpp index 16626ae0..abc02206 100644 --- a/CommonLibSF/src/SFSE/Logger.cpp +++ b/CommonLibSF/src/SFSE/Logger.cpp @@ -1,4 +1,5 @@ #include "SFSE/Logger.h" + #include "SFSE/API.h" #include