mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 21:47:00 -04:00
Use template specialization instead of name concatenation so that reflection of enums works for enums that are inside another class or namespace.
This commit is contained in:
@@ -142,7 +142,7 @@ void Writer::handle(const IndexMap<K,V>& m) {
|
||||
#define REFLECT_ENUM_WRITER(Enum) \
|
||||
template<> void Writer::handle<Enum>(const Enum& enum_) { \
|
||||
EnumWriter writer(*this); \
|
||||
reflect_ ## Enum(const_cast<Enum&>(enum_), writer); \
|
||||
ReflectEnum<Enum>::reflect(const_cast<Enum&>(enum_), writer); \
|
||||
}
|
||||
|
||||
/// Handler to be used when reflecting enumerations for Writer
|
||||
|
||||
Reference in New Issue
Block a user