diff options
Diffstat (limited to 'libs/input/PropertyMap.cpp')
-rw-r--r-- | libs/input/PropertyMap.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/libs/input/PropertyMap.cpp b/libs/input/PropertyMap.cpp index 9a4f10b21d..ed9ac9fc72 100644 --- a/libs/input/PropertyMap.cpp +++ b/libs/input/PropertyMap.cpp @@ -16,8 +16,6 @@ #define LOG_TAG "PropertyMap" -#include <cstdlib> - #include <input/PropertyMap.h> #include <log/log.h> @@ -46,16 +44,6 @@ void PropertyMap::addProperty(const std::string& key, const std::string& value) mProperties.emplace(key, value); } -std::unordered_set<std::string> PropertyMap::getKeysWithPrefix(const std::string& prefix) const { - std::unordered_set<std::string> keys; - for (const auto& [key, _] : mProperties) { - if (key.starts_with(prefix)) { - keys.insert(key); - } - } - return keys; -} - bool PropertyMap::hasProperty(const std::string& key) const { return mProperties.find(key) != mProperties.end(); } @@ -114,23 +102,6 @@ bool PropertyMap::tryGetProperty(const std::string& key, float& outValue) const return true; } -bool PropertyMap::tryGetProperty(const std::string& key, double& outValue) const { - std::string stringValue; - if (!tryGetProperty(key, stringValue) || stringValue.length() == 0) { - return false; - } - - char* end; - double value = strtod(stringValue.c_str(), &end); - if (*end != '\0') { - ALOGW("Property key '%s' has invalid value '%s'. Expected a double.", key.c_str(), - stringValue.c_str()); - return false; - } - outValue = value; - return true; -} - void PropertyMap::addAll(const PropertyMap* map) { for (const auto& [key, value] : map->mProperties) { mProperties.emplace(key, value); |