diff options
| author | Philip Damianik <39028343+pdamianik@users.noreply.github.com> | 2023-09-06 16:14:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-06 16:14:18 +0200 |
| commit | a15e3e1f380e3b90f976bc7d1d8b4daabd4cbd3b (patch) | |
| tree | 52fa8a5e37d31e1f0f94d16b59532700ec136cb2 /src/config/ConfigManager.hpp | |
| parent | a1cc99a9868ceb31d466e4d31baf6b70721d9321 (diff) | |
config/input: Improve fallback behavior for unset device config values (#3184)
* Fix fallback behavior for unset device config values
* Replace overload with default argument for fallback config key
* Remove default value for fallback argument in source
* Fix typos
Diffstat (limited to 'src/config/ConfigManager.hpp')
| -rw-r--r-- | src/config/ConfigManager.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index a14f5470..8586ec89 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -156,9 +156,9 @@ class CConfigManager { void setInt(const std::string&, int); void setString(const std::string&, const std::string&); - int getDeviceInt(const std::string&, const std::string&, std::optional<bool> touchpad = {}); - float getDeviceFloat(const std::string&, const std::string&, std::optional<bool> touchpad = {}); - std::string getDeviceString(const std::string&, const std::string&, std::optional<bool> touchpad = {}); + int getDeviceInt(const std::string&, const std::string&, const std::string& fallback = ""); + float getDeviceFloat(const std::string&, const std::string&, const std::string& fallback = ""); + std::string getDeviceString(const std::string&, const std::string&, const std::string& fallback = ""); bool deviceConfigExists(const std::string&); bool shouldBlurLS(const std::string&); @@ -255,7 +255,7 @@ class CConfigManager { void applyUserDefinedVars(std::string&, const size_t); void loadConfigLoadVars(); SConfigValue getConfigValueSafe(const std::string&); - SConfigValue getConfigValueSafeDevice(const std::string&, const std::string&, std::optional<bool> touchpad); + SConfigValue getConfigValueSafeDevice(const std::string&, const std::string&, const std::string& fallback = ""); void parseLine(std::string&); void configSetValueSafe(const std::string&, const std::string&); void handleDeviceConfig(const std::string&, const std::string&); |
