diff options
author | June McEnroe <june@causal.agency> | 2019-12-30 22:09:36 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-30 22:09:36 -0500 |
commit | a498022793aa559a1739bd99189ade74b15e077f (patch) | |
tree | 75963abc5feca9dc5cfb8d6f3877c89b970808f6 /database.h | |
parent | Remove scoop -ABC (diff) | |
download | litterbox-a498022793aa559a1739bd99189ade74b15e077f.tar.gz litterbox-a498022793aa559a1739bd99189ade74b15e077f.zip |
Use X macro for Type enum
Diffstat (limited to 'database.h')
-rw-r--r-- | database.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/database.h b/database.h index 0494851..1837a9f 100644 --- a/database.h +++ b/database.h @@ -32,16 +32,21 @@ enum { DatabaseVersion = 0 }; +#define ENUM_TYPE \ + X(Privmsg, "privmsg") \ + X(Notice, "notice") \ + X(Action, "action") \ + X(Join, "join") \ + X(Part, "part") \ + X(Quit, "quit") \ + X(Kick, "kick") \ + X(Nick, "nick") \ + X(Topic, "topic") + enum Type { - Privmsg, - Notice, - Action, - Join, - Part, - Quit, - Kick, - Nick, - Topic, +#define X(id, _) id, + ENUM_TYPE +#undef X }; static bool verbose; |