diff options
Diffstat (limited to 'src/libserver/css/css_property.cxx')
-rw-r--r-- | src/libserver/css/css_property.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libserver/css/css_property.cxx b/src/libserver/css/css_property.cxx index 2a463f8da..1dd73026d 100644 --- a/src/libserver/css/css_property.cxx +++ b/src/libserver/css/css_property.cxx @@ -17,6 +17,7 @@ #include "css_property.hxx" #include "frozen/unordered_map.h" #include "frozen/string.h" +#include "libutil/cxx/util.hxx" namespace rspamd::css { @@ -43,10 +44,10 @@ auto token_string_to_property(const std::string_view &inp) css_property_type ret = css_property_type::PROPERTY_NYI; - auto known_type = prop_names_map.find(inp); + auto known_type = find_map(prop_names_map, inp); - if (known_type != prop_names_map.end()) { - ret = known_type->second; + if (known_type) { + ret = known_type.value().get(); } return ret; |