mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 03:02:49 +00:00
Config: Support double values
This commit is contained in:
parent
2fa23a2d54
commit
d6610f2594
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,14 @@ void ApplyProperty<uint32_t>(uint32_t& propertyToSet, const std::string_view& va
|
|||
propertyToSet = atoi(valStr.c_str());
|
||||
}
|
||||
|
||||
template<>
|
||||
void ApplyProperty<double>(double& propertyToSet, const std::string_view& value)
|
||||
{
|
||||
// Why, C++?
|
||||
std::string valStr = std::string(value);
|
||||
propertyToSet = std::stod(valStr.c_str());
|
||||
}
|
||||
|
||||
template<>
|
||||
void ApplyProperty<bool>(bool& propertyToSet, const std::string_view& value)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue