Skip to content

Commit 96909fc

Browse files
committed
fix custom formatter after fmt update
1 parent 7391a99 commit 96909fc

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/input/guid.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ namespace sdl {
4444

4545

4646
template<>
47-
struct fmt::formatter<sdl::GUID> : formatter<std::string> {
48-
auto format(const sdl::GUID& guid, format_context& ctx) {
47+
struct fmt::formatter<sdl::GUID> : fmt::formatter<std::string> {
48+
auto format(const sdl::GUID& guid, format_context& ctx) const {
4949
return formatter<std::string>::format(guid.to_string(), ctx);
5050
}
5151
};

src/input/input.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "manager/service_provider.hpp"
1414

1515

16+
#include <fmt/base.h>
1617
#include <fmt/format.h>
1718
#include <memory>
1819
#include <vector>
@@ -116,6 +117,7 @@ namespace input {
116117
struct InputSettings {
117118

118119
template<typename T>
120+
requires fmt::formattable<T>
119121
[[nodiscard]] static helper::expected<void, std::string> has_unique_members(const std::vector<T>& to_check) {
120122
std::vector<T> already_bound{};
121123

src/manager/sdl_controller_key.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ namespace sdl {
2828
} // namespace sdl
2929

3030
template<>
31-
struct fmt::formatter<sdl::ControllerKey> : formatter<std::string> {
32-
auto format(const sdl::ControllerKey& key, format_context& ctx) {
31+
struct fmt::formatter<sdl::ControllerKey> : fmt::formatter<std::string> {
32+
auto format(const sdl::ControllerKey& key, format_context& ctx) const {
3333
return formatter<std::string>::format(key.to_string(), ctx);
3434
}
3535
};

src/manager/sdl_key.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ namespace sdl {
8686
} // namespace sdl
8787

8888
template<>
89-
struct fmt::formatter<sdl::Key> : formatter<std::string> {
90-
auto format(const sdl::Key& key, format_context& ctx) {
89+
struct fmt::formatter<sdl::Key> : fmt::formatter<std::string> {
90+
auto format(const sdl::Key& key, format_context& ctx) const {
9191
return formatter<std::string>::format(key.to_string(), ctx);
9292
}
9393
};

0 commit comments

Comments
 (0)