aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/css
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-07-17 16:43:47 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-07-17 16:43:47 +0100
commit969902f04569ab12e69e0d57ef1f6e9f0c42f855 (patch)
tree2d4ae6f19a613c4327e94da917aa89694dd2ff00 /src/libserver/css
parent93022e6207ed15f8dd231ad43511d7c9e3f2eee8 (diff)
downloadrspamd-969902f04569ab12e69e0d57ef1f6e9f0c42f855.tar.gz
rspamd-969902f04569ab12e69e0d57ef1f6e9f0c42f855.zip
[Rework] Use another version of hash table from the same author
Diffstat (limited to 'src/libserver/css')
-rw-r--r--src/libserver/css/css.cxx4
-rw-r--r--src/libserver/css/css_colors_list.hxx4
-rw-r--r--src/libserver/css/css_rule.hxx4
-rw-r--r--src/libserver/css/css_value.cxx2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/libserver/css/css.cxx b/src/libserver/css/css.cxx
index 9e26eb42f..7de4ab307 100644
--- a/src/libserver/css/css.cxx
+++ b/src/libserver/css/css.cxx
@@ -15,7 +15,7 @@
*/
#include "css.hxx"
-#include "contrib/robin-hood/robin_hood.h"
+#include "contrib/ankerl/unordered_dense.h"
#include "css_parser.hxx"
#include "libserver/html/html_tag.hxx"
#include "libserver/html/html_block.hxx"
@@ -34,7 +34,7 @@ public:
using sel_shared_hash = smart_ptr_hash<css_selector>;
using sel_shared_eq = smart_ptr_equal<css_selector>;
using selector_ptr = std::unique_ptr<css_selector>;
- using selectors_hash = robin_hood::unordered_flat_map<selector_ptr, css_declarations_block_ptr,
+ using selectors_hash = ankerl::unordered_dense::map<selector_ptr, css_declarations_block_ptr,
sel_shared_hash, sel_shared_eq>;
using universal_selector_t = std::pair<selector_ptr, css_declarations_block_ptr>;
selectors_hash tags_selector;
diff --git a/src/libserver/css/css_colors_list.hxx b/src/libserver/css/css_colors_list.hxx
index b1fc5d6ee..e880aa24b 100644
--- a/src/libserver/css/css_colors_list.hxx
+++ b/src/libserver/css/css_colors_list.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <string_view>
-#include "contrib/robin-hood/robin_hood.h"
+#include "contrib/ankerl/unordered_dense.h"
#include "css_value.hxx"
namespace rspamd::css {
@@ -30,7 +30,7 @@ namespace rspamd::css {
* TODO: think about frozen structs when we can deal with 700 values without
* compiler limits...
*/
-static const robin_hood::unordered_flat_map<std::string_view, css_color> css_colors_map{
+static const ankerl::unordered_dense::map<std::string_view, css_color> css_colors_map{
{"aliceblue", {240, 248, 255}},
{"antiquewhite", {250, 235, 215}},
{"antiquewhite1", {255, 239, 219}},
diff --git a/src/libserver/css/css_rule.hxx b/src/libserver/css/css_rule.hxx
index acf44ba86..c942b8795 100644
--- a/src/libserver/css/css_rule.hxx
+++ b/src/libserver/css/css_rule.hxx
@@ -21,7 +21,7 @@
#include "css_value.hxx"
#include "css_property.hxx"
#include "css_parser.hxx"
-#include "contrib/robin-hood/robin_hood.h"
+#include "contrib/ankerl/unordered_dense.h"
#include "libutil/cxx/util.hxx"
#include "libutil/cxx/hash_util.hxx"
#include <vector>
@@ -121,7 +121,7 @@ public:
auto compile_to_block(rspamd_mempool_t *pool) const -> rspamd::html::html_block *;
private:
- robin_hood::unordered_flat_set<rule_shared_ptr, rule_shared_hash, rule_shared_eq> rules;
+ ankerl::unordered_dense::set<rule_shared_ptr, rule_shared_hash, rule_shared_eq> rules;
};
using css_declarations_block_ptr = std::shared_ptr<css_declarations_block>;
diff --git a/src/libserver/css/css_value.cxx b/src/libserver/css/css_value.cxx
index 6982647f4..7a451e1e5 100644
--- a/src/libserver/css/css_value.cxx
+++ b/src/libserver/css/css_value.cxx
@@ -19,7 +19,7 @@
#include "frozen/unordered_map.h"
#include "frozen/string.h"
#include "libutil/util.h"
-#include "contrib/robin-hood/robin_hood.h"
+#include "contrib/ankerl/unordered_dense.h"
#include "fmt/core.h"
#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL