From 724e2e6d272e4420978a72619e50e4beb507c9e9 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 11 Mar 2020 23:28:38 -0400 Subject: [PATCH] Withdraws ability to select an integer size for ReflectableEnums. It isn't that useful, and this'll help if/when I get to serialisation. --- Analyser/Static/AmstradCPC/Target.hpp | 2 +- Analyser/Static/AppleII/Target.hpp | 4 ++-- Analyser/Static/Commodore/Target.hpp | 2 +- Analyser/Static/MSX/Target.hpp | 2 +- Analyser/Static/Macintosh/Target.hpp | 2 +- Analyser/Static/Oric/Target.hpp | 4 ++-- Analyser/Static/ZX8081/Target.hpp | 2 +- Reflection/Enum.h | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Analyser/Static/AmstradCPC/Target.hpp b/Analyser/Static/AmstradCPC/Target.hpp index 451389661..bb35a034d 100644 --- a/Analyser/Static/AmstradCPC/Target.hpp +++ b/Analyser/Static/AmstradCPC/Target.hpp @@ -19,7 +19,7 @@ namespace Static { namespace AmstradCPC { struct Target: public ::Analyser::Static::Target, public Reflection::Struct { - ReflectableEnum(Model, int, CPC464, CPC664, CPC6128); + ReflectableEnum(Model, CPC464, CPC664, CPC6128); Model model = Model::CPC464; std::string loading_command; diff --git a/Analyser/Static/AppleII/Target.hpp b/Analyser/Static/AppleII/Target.hpp index 04ee6caee..fb4409a47 100644 --- a/Analyser/Static/AppleII/Target.hpp +++ b/Analyser/Static/AppleII/Target.hpp @@ -18,13 +18,13 @@ namespace Static { namespace AppleII { struct Target: public ::Analyser::Static::Target, public Reflection::Struct { - ReflectableEnum(Model, int, + ReflectableEnum(Model, II, IIplus, IIe, EnhancedIIe ); - ReflectableEnum(DiskController, int, + ReflectableEnum(DiskController, None, SixteenSector, ThirteenSector diff --git a/Analyser/Static/Commodore/Target.hpp b/Analyser/Static/Commodore/Target.hpp index 59ec73d57..8655da9cc 100644 --- a/Analyser/Static/Commodore/Target.hpp +++ b/Analyser/Static/Commodore/Target.hpp @@ -25,7 +25,7 @@ struct Target: public ::Analyser::Static::Target, public Reflection::Struct { - ReflectableEnum(Model, int, Mac128k, Mac512k, Mac512ke, MacPlus); + ReflectableEnum(Model, Mac128k, Mac512k, Mac512ke, MacPlus); Model model = Model::MacPlus; Target() { diff --git a/Analyser/Static/Oric/Target.hpp b/Analyser/Static/Oric/Target.hpp index b18525bda..281c3b7f8 100644 --- a/Analyser/Static/Oric/Target.hpp +++ b/Analyser/Static/Oric/Target.hpp @@ -19,13 +19,13 @@ namespace Static { namespace Oric { struct Target: public ::Analyser::Static::Target, public Reflection::Struct { - ReflectableEnum(ROM, int, + ReflectableEnum(ROM, BASIC10, BASIC11, Pravetz ); - ReflectableEnum(DiskInterface, int, + ReflectableEnum(DiskInterface, None, Microdisc, Pravetz, diff --git a/Analyser/Static/ZX8081/Target.hpp b/Analyser/Static/ZX8081/Target.hpp index 2551a0f5d..e3c100d61 100644 --- a/Analyser/Static/ZX8081/Target.hpp +++ b/Analyser/Static/ZX8081/Target.hpp @@ -19,7 +19,7 @@ namespace Static { namespace ZX8081 { struct Target: public ::Analyser::Static::Target, public Reflection::Struct { - ReflectableEnum(MemoryModel, int, + ReflectableEnum(MemoryModel, Unexpanded, SixteenKB, SixtyFourKB diff --git a/Reflection/Enum.h b/Reflection/Enum.h index e47d1b5b6..0a9e86a9c 100644 --- a/Reflection/Enum.h +++ b/Reflection/Enum.h @@ -18,8 +18,8 @@ namespace Reflection { -#define ReflectableEnum(Name, Type, ...) \ - enum class Name: Type { __VA_ARGS__ }; \ +#define ReflectableEnum(Name, ...) \ + enum class Name { __VA_ARGS__ }; \ constexpr static const char *__declaration##Name = #__VA_ARGS__; #define EnumDeclaration(Name) #Name, __declaration##Name