diff --git a/include/components/types.hpp b/include/components/types.hpp index 0271ec9a..cb751321 100644 --- a/include/components/types.hpp +++ b/include/components/types.hpp @@ -8,6 +8,13 @@ POLYBAR_NS +struct enum_hash { + template + inline typename std::enable_if::value, size_t>::type operator()(T const value) const { + return static_cast(value); + } +}; + enum class edge : uint8_t { NONE = 0U, TOP, BOTTOM, LEFT, RIGHT, ALL }; enum class alignment : uint8_t { NONE = 0U, LEFT, CENTER, RIGHT }; @@ -115,7 +122,7 @@ struct bar_settings { line_settings underline{}; line_settings overline{}; - std::unordered_map borders{}; + std::unordered_map borders{}; uint8_t spacing{1U}; string separator{};