diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-06 16:31:36 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-06 16:31:36 +0100 |
commit | 8381b141d52546897af76c0798ec5bda654a6104 (patch) | |
tree | 4a736f073e44eed4765d8f03020e0a23fd7869d0 /src/libserver/css | |
parent | 099ae44013e09d869ec24046ecadbf55038bb878 (diff) | |
download | rspamd-8381b141d52546897af76c0798ec5bda654a6104.tar.gz rspamd-8381b141d52546897af76c0798ec5bda654a6104.zip |
[Minor] Css: Fix bits operations
Diffstat (limited to 'src/libserver/css')
-rw-r--r-- | src/libserver/css/css_rule.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/css/css_rule.cxx b/src/libserver/css/css_rule.cxx index 02f33aa13..417770a08 100644 --- a/src/libserver/css/css_rule.cxx +++ b/src/libserver/css/css_rule.cxx @@ -56,7 +56,7 @@ void css_rule::override_values(const css_rule &other) /* Copy only not set values */ std::copy_if(other.values.begin(), other.values.end(), std::back_inserter(values), [&bits](const auto &elt) -> bool { - return !isset(&bits, static_cast<int>(elt.type)); + return (bits & static_cast<int>(elt.type)) == 0; }); } @@ -74,8 +74,8 @@ void css_rule::merge_values(const css_rule &other) /* Copy only not set values */ std::copy_if(other.values.begin(), other.values.end(), std::back_inserter(values), [&bits](const auto &elt) -> bool { - return !isset(&bits, static_cast<int>(elt.type)); - }); + return (bits & static_cast<int>(elt.type)) == 0; + }); } auto css_declarations_block::add_rule(rule_shared_ptr rule) -> bool |