From 49a73063d518fc1fc03624fa116c6ea497637b02 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Wed, 19 Jul 2023 00:59:54 +0200 Subject: [PATCH] Add char to config --- src/Config.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Config.cpp b/src/Config.cpp index 7c4fe44..f12abfc 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -43,6 +43,17 @@ void ApplyProperty(double& propertyToSet, const std::string_view& value) propertyToSet = std::stod(valStr.c_str()); } +template<> +void ApplyProperty(char& propertyToSet, const std::string_view& value) +{ + if (value.size() > 1) + { + LOG("Invalid size for char property: " << value); + return; + } + propertyToSet = value[0]; +} + template<> void ApplyProperty(bool& propertyToSet, const std::string_view& value) {