fix setting the default value

basically before this commit, the default value was set *before* the
prefix check which means it was set on each line instead of only when
the current var is being parsed (as it should)
This commit is contained in:
jacekpoz 2024-04-25 22:32:16 +02:00
parent e8f050ad18
commit 9a75404847
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -90,8 +90,9 @@ inline void toLower(std::string &str) {
CHECK_VAR(section, name, __VA_ARGS__) CHECK_VAR(section, name, __VA_ARGS__)
#define VAR_GENERIC_D(section, name, default, ...) \ #define VAR_GENERIC_D(section, name, default, ...) \
ret section.name = default;\ VAR_GENERIC(section, name,\
VAR_GENERIC(section, name, __VA_ARGS__) ret section.name = default;\
__VA_ARGS__)
#define VAR_UINT(section, name) \ #define VAR_UINT(section, name) \
VAR_GENERIC(section, name,\ VAR_GENERIC(section, name,\