aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat
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/libstat
parent93022e6207ed15f8dd231ad43511d7c9e3f2eee8 (diff)
downloadrspamd-969902f04569ab12e69e0d57ef1f6e9f0c42f855.tar.gz
rspamd-969902f04569ab12e69e0d57ef1f6e9f0c42f855.zip
[Rework] Use another version of hash table from the same author
Diffstat (limited to 'src/libstat')
-rw-r--r--src/libstat/backends/cdb_backend.cxx4
-rw-r--r--src/libstat/backends/http_backend.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libstat/backends/cdb_backend.cxx b/src/libstat/backends/cdb_backend.cxx
index d0915d2d7..5e188b978 100644
--- a/src/libstat/backends/cdb_backend.cxx
+++ b/src/libstat/backends/cdb_backend.cxx
@@ -27,7 +27,7 @@
#include <string>
#include <optional>
#include "contrib/expected/expected.hpp"
-#include "contrib/robin-hood/robin_hood.h"
+#include "contrib/ankerl/unordered_dense.h"
#include "fmt/core.h"
namespace rspamd::stat::cdb {
@@ -87,7 +87,7 @@ private:
* We store weak pointers here to allow owning cdb statfiles to free
* expensive cdb before this cache is terminated (e.g. on dynamic cdb reload)
*/
- robin_hood::unordered_flat_map<std::string, std::weak_ptr<struct cdb>> elts;
+ ankerl::unordered_dense::map<std::string, std::weak_ptr<struct cdb>> elts;
struct cdb_deleter {
void operator()(struct cdb *c) const {
diff --git a/src/libstat/backends/http_backend.cxx b/src/libstat/backends/http_backend.cxx
index 3f4f1abd0..69c735a09 100644
--- a/src/libstat/backends/http_backend.cxx
+++ b/src/libstat/backends/http_backend.cxx
@@ -19,7 +19,7 @@
#include "libserver/http/http_connection.h"
#include "libserver/mempool_vars_internal.h"
#include "upstream.h"
-#include "contrib/robin-hood/robin_hood.h"
+#include "contrib/ankerl/unordered_dense.h"
#include <vector>
namespace rspamd::stat::http {
@@ -91,7 +91,7 @@ public:
bool learn) -> bool;
private:
http_backends_collection *all_backends;
- robin_hood::unordered_flat_map<int, const struct rspamd_statfile_config *> seen_statfiles;
+ ankerl::unordered_dense::map<int, const struct rspamd_statfile_config *> seen_statfiles;
struct upstream *selected;
private:
http_backend_runtime(struct rspamd_task *task, bool is_learn) :