From 8988065395be5e0e6571b4985f718c6729b99a73 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 18 Apr 2024 20:24:38 +0200 Subject: [PATCH] remove redundant type macros --- src/osuparser.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/osuparser.cpp b/src/osuparser.cpp index a29f2dd..be050d6 100644 --- a/src/osuparser.cpp +++ b/src/osuparser.cpp @@ -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);\