remove redundant type macros

This commit is contained in:
jacekpoz 2024-04-18 20:24:38 +02:00
parent 1e7b355480
commit 8988065395
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -63,7 +63,6 @@ inline void toLower(std::string &str) {
ret section.name = default;\
VAR_GENERIC(section, name, __VA_ARGS__)
#define UINT uintmax_t
#define VAR_UINT(section, name) \
VAR_GENERIC(section, name,\
UINT value = std::stoull(checkAndRemove(line, namePascalCased));\
@ -74,7 +73,6 @@ inline void toLower(std::string &str) {
UINT value = std::stoull(checkAndRemove(line, namePascalCased));\
)
#define INT intmax_t
#define VAR_INT(section, name) \
VAR_GENERIC(section, name,\
INT value = std::stoll(checkAndRemove(line, namePascalCased));\
@ -84,7 +82,6 @@ inline void toLower(std::string &str) {
INT value = std::stoll(checkAndRemove(line, namePascalCased));\
)
#define STRING std::string
#define VAR_STRING(section, name) \
VAR_GENERIC(section, name,\
STRING value = checkAndRemove(line, namePascalCased);\
@ -94,7 +91,6 @@ inline void toLower(std::string &str) {
STRING value = checkAndRemove(line, namePascalCased);\
)
#define BOOL bool
#define VAR_BOOL(section, name) \
VAR_GENERIC(section, name,\
BOOL value = std::stoi(checkAndRemove(line, namePascalCased));\
@ -104,7 +100,6 @@ inline void toLower(std::string &str) {
BOOL value = std::stoi(checkAndRemove(line, namePascalCased));\
)
#define FLOAT double
#define VAR_FLOAT(section, name) \
VAR_GENERIC(section, name,\
FLOAT value = std::stof(checkAndRemove(line, namePascalCased));\
@ -114,7 +109,6 @@ inline void toLower(std::string &str) {
FLOAT value = std::stof(checkAndRemove(line, namePascalCased));\
)
#define COLOUR sf::Color
#define VAR_COLOUR(section, name) \
VAR_GENERIC(section, name,\
std::string val = checkAndRemove(line, namePascalCased);\
@ -140,7 +134,6 @@ inline void toLower(std::string &str) {
sf::Color value(colours[0], colours[1], colours[2]);\
)
#define ENUM(name, ...)
#define VAR_ENUM(section, name, enum_type) \
VAR_GENERIC(section, name,\
std::string val = checkAndRemove(line, namePascalCased);\
@ -156,7 +149,6 @@ inline void toLower(std::string &str) {
value << ss;\
)
#define STRUCT(name, ...)
#define VAR_STRUCT(section, name, struct_type) \
VAR_GENERIC(section, name,\
std::string val = checkAndRemove(line, namePascalCased);\