浏览代码

Add FamilyId to std::hash.

Michael Ragazzon 5 年之前
父节点
当前提交
97b004070b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Include/RmlUi/Core/Types.h

+ 5 - 0
Include/RmlUi/Core/Types.h

@@ -101,6 +101,7 @@ struct TransitionList;
 struct Rectangle;
 enum class EventId : uint16_t;
 enum class PropertyId : uint8_t;
+enum class FamilyId : int;
 
 // Types for external interfaces.
 using FileHandle = uintptr_t;
@@ -206,6 +207,10 @@ template <> struct hash<::Rml::Character> {
     using utype = typename ::std::underlying_type<::Rml::Character>::type;
     size_t operator() (const ::Rml::Character& t) const { ::std::hash<utype> h; return h(static_cast<utype>(t)); }
 };
+template <> struct hash<::Rml::FamilyId> {
+	using utype = typename ::std::underlying_type<::Rml::FamilyId>::type;
+	size_t operator() (const ::Rml::FamilyId& t) const { ::std::hash<utype> h; return h(static_cast<utype>(t)); }
+};
 }
 
 #endif