Add add-ons enum type

This commit is contained in:
John Zhao
2018-05-04 13:44:13 +08:00
parent 8b21989dcc
commit 2e31a79b1a
4 changed files with 37 additions and 1 deletions

View File

@@ -122,6 +122,19 @@ const char *to_string(const Source &value) {
#undef CASE
}
const char *to_string(const AddOns &value) {
#define CASE(X) \
case AddOns::X: \
return "AddOns::" #X;
switch (value) {
CASE(INFRARED)
CASE(INFRARED2)
default:
return "AddOns::UNKNOWN";
}
#undef CASE
}
const char *to_string(const Format &value) {
#define CASE(X) \
case Format::X: \