From 38e20390ddf38edd74447ef7db2af660b8e0ff32 Mon Sep 17 00:00:00 2001 From: Niklas Halle Date: Mon, 24 Aug 2020 19:04:13 +0200 Subject: add all available commands (in this branch? @Max where are the others?) --- include/Enum2String.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/Enum2String.hpp') diff --git a/include/Enum2String.hpp b/include/Enum2String.hpp index 4992e0d..da3ab94 100644 --- a/include/Enum2String.hpp +++ b/include/Enum2String.hpp @@ -3,13 +3,13 @@ #undef END_ENUM #ifndef GENERATE_ENUM_STRINGS -#define DECL_ENUM_ELEMENT( element ) element -#define BEGIN_ENUM( ENUM_NAME ) typedef enum tag##ENUM_NAME -#define END_ENUM( ENUM_NAME ) ENUM_NAME; \ +#define DECL_ENUM_ELEMENT(element) element +#define BEGIN_ENUM(ENUM_NAME) typedef enum tag##ENUM_NAME +#define END_ENUM(ENUM_NAME) ENUM_NAME; \ std::string GetString##ENUM_NAME(enum tag##ENUM_NAME index); #else #define DECL_ENUM_ELEMENT( element ) #element - #define BEGIN_ENUM( ENUM_NAME ) std::string gs_##ENUM_NAME [] = - #define END_ENUM( ENUM_NAME ) ; std::string GetString##ENUM_NAME(\ +#define BEGIN_ENUM( ENUM_NAME ) std::string gs_##ENUM_NAME [] = +#define END_ENUM( ENUM_NAME ) ; std::string GetString##ENUM_NAME(\ tag##ENUM_NAME index){ return gs_##ENUM_NAME [index]; } #endif \ No newline at end of file -- cgit v1.2.3-54-g00ecf