summaryrefslogtreecommitdiff
path: root/src/enums
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-18 20:10:54 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-18 20:10:54 +0300
commita044c97c30d014b7b8db7d72b03dc48829e1099a (patch)
treec9f8e66d3980bc9fbffb76932a11d36316040b86 /src/enums
parent324aae21e0c920b53ccc12d14f2550fc2d95e083 (diff)
downloadmv-a044c97c30d014b7b8db7d72b03dc48829e1099a.tar.gz
mv-a044c97c30d014b7b8db7d72b03dc48829e1099a.tar.bz2
mv-a044c97c30d014b7b8db7d72b03dc48829e1099a.tar.xz
mv-a044c97c30d014b7b8db7d72b03dc48829e1099a.zip
Allow set type for strong typed enum with values.
Diffstat (limited to 'src/enums')
-rw-r--r--src/enums/net/mailopentype.h2
-rw-r--r--src/enums/simpletypes/enumdefines.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/enums/net/mailopentype.h b/src/enums/net/mailopentype.h
index 5040cee18..ad62a0252 100644
--- a/src/enums/net/mailopentype.h
+++ b/src/enums/net/mailopentype.h
@@ -23,7 +23,7 @@
#include "enums/simpletypes/enumdefines.h"
-enumStart(MailOpenType)
+enumStartT(MailOpenType, int8_t)
{
Mail = 0,
Account = 1,
diff --git a/src/enums/simpletypes/enumdefines.h b/src/enums/simpletypes/enumdefines.h
index 4db9bbab6..a1b5401ff 100644
--- a/src/enums/simpletypes/enumdefines.h
+++ b/src/enums/simpletypes/enumdefines.h
@@ -26,6 +26,7 @@
#ifdef ADVGCC
#define enumStart(name) enum class name
+#define enumStartT(name, type) enum class name : type
#define enumEnd(name) ; \
typedef name name##T
@@ -36,6 +37,11 @@
{ \
enum T
+#define enumStartT(name, type) \
+ namespace name \
+ { \
+ enum T
+
#define enumEnd(name) \
;\
} \