diff --git a/include/util/format.hpp b/include/util/format.hpp index 543a100..48f0f51 100644 --- a/include/util/format.hpp +++ b/include/util/format.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include class pow_format { public: @@ -84,5 +85,15 @@ namespace fmt { ); } }; + + + // Glib ustirng support + template <> + struct formatter : formatter { + template + auto format(const Glib::ustring& value, FormatContext& ctx) { + return formatter::format(value, ctx); + } + }; } diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index b504c8d..74987ca 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -8,13 +8,7 @@ #include #include -template <> -struct fmt::formatter : formatter { - template - auto format(const Glib::ustring& value, FormatContext& ctx) { - return formatter::format(value, ctx); - } -}; +#include "util/format.hpp" template <> struct fmt::formatter : formatter {