Default options for widgets / layouts / themes now OK on VC++
This commit is contained in:
@@ -34,16 +34,22 @@ struct Zone
|
||||
#define LEN_ZONE_OPTION_STRING 8
|
||||
union ZoneOptionValue
|
||||
{
|
||||
bool boolValue;
|
||||
uint32_t unsignedValue;
|
||||
int32_t signedValue;
|
||||
bool boolValue;
|
||||
char stringValue[LEN_ZONE_OPTION_STRING];
|
||||
};
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define OPTION_DEFAULT_VALUE(...)
|
||||
#define OPTION_DEFAULT_VALUE_UNSIGNED(x) { uint32_t(x) }
|
||||
#define OPTION_DEFAULT_VALUE_SIGNED(x) { uint32_t(x) }
|
||||
#define OPTION_DEFAULT_VALUE_BOOL(x) { uint32_t(x) }
|
||||
#define OPTION_DEFAULT_VALUE_STRING(...) { *((ZoneOptionValue *)(const char []) __VA_ARGS__) }
|
||||
#else
|
||||
#define OPTION_DEFAULT_VALUE(...) __VA_ARGS__
|
||||
#define OPTION_DEFAULT_VALUE_UNSIGNED(x) { .unsignedValue = (x) }
|
||||
#define OPTION_DEFAULT_VALUE_SIGNED(x) { .signedValue = (x) }
|
||||
#define OPTION_DEFAULT_VALUE_BOOL(x) { .boolValue = (x) }
|
||||
#define OPTION_DEFAULT_VALUE_STRING(...) { .stringValue = __VA_ARGS__}
|
||||
#endif
|
||||
|
||||
struct ZoneOption
|
||||
|
||||
Reference in New Issue
Block a user