Browse Source

FamilyId: Do not remove cv-ref qualifiers

Michael Ragazzon 4 years ago
parent
commit
c43f32b365
1 changed files with 2 additions and 6 deletions
  1. 2 6
      Include/RmlUi/Core/Traits.h

+ 2 - 6
Include/RmlUi/Core/Traits.h

@@ -80,11 +80,6 @@ protected:
 		static int id = 0;
 		static int id = 0;
 		return id++;
 		return id++;
 	}
 	}
-	template<typename T>
-	static FamilyId GetId() {
-		static int id = GetNewId();
-		return static_cast<FamilyId>(id);
-	}
 };
 };
 
 
 template<typename T>
 template<typename T>
@@ -93,7 +88,8 @@ public:
 	// Get a unique ID for a given type.
 	// Get a unique ID for a given type.
 	// Note: IDs will be unique across DLL-boundaries even for the same type.
 	// Note: IDs will be unique across DLL-boundaries even for the same type.
 	static FamilyId Id() {
 	static FamilyId Id() {
-		return GetId< typename std::remove_cv< typename std::remove_reference< T >::type >::type >();
+		static int id = GetNewId();
+		return static_cast<FamilyId>(id);
 	}
 	}
 };
 };