diff include/core/ini.h @ 136:7d3ad9529c4c

ini: fix bool getters to provide default vals for bools and ints
author Paper <mrpapersonic@gmail.com>
date Fri, 10 Nov 2023 10:07:01 -0500
parents bc218c9d2ea6
children 53211cb1e7f5
line wrap: on
line diff
--- a/include/core/ini.h	Thu Nov 09 18:01:56 2023 -0500
+++ b/include/core/ini.h	Fri Nov 10 10:07:01 2023 -0500
@@ -42,10 +42,10 @@
 		/* Integer? */
 		if constexpr (std::is_same<T, bool>::value) {
 			/* Boolean? */
-			return Strings::ToBool(val);
+			return Strings::ToBool(val, def);
 		} else {
 			/* Always fall back to long long */
-			return Strings::ToInt<T>(val);
+			return Strings::ToInt<T>(val, def);
 		}
 	} else {
 		return val;