mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-27 16:33:38 +00:00
[core] Switch to ankerl::unordered_dense
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace routing
|
||||
{
|
||||
@@ -385,9 +386,9 @@ string DebugPrint(HighwayType type)
|
||||
void FromString(std::string_view s, HighwayType & highwayType)
|
||||
{
|
||||
// Build reverse lookup from DebugPrint function
|
||||
static std::unordered_map<std::string, HighwayType> const stringToEnum = []()
|
||||
static ankerl::unordered_dense::map<std::string, HighwayType> const stringToEnum = []()
|
||||
{
|
||||
std::unordered_map<std::string, HighwayType> map;
|
||||
ankerl::unordered_dense::map<std::string, HighwayType> map;
|
||||
|
||||
// All possible HighwayType values
|
||||
constexpr HighwayType allTypes[] = {
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
class Classificator;
|
||||
class FeatureType;
|
||||
|
||||
@@ -356,7 +357,7 @@ protected:
|
||||
explicit VehicleModelFactory(CountryParentNameGetterFn const & countryParentNameGetterFn);
|
||||
std::string GetParent(std::string const & country) const;
|
||||
|
||||
std::unordered_map<std::string, std::shared_ptr<VehicleModelInterface>> m_models;
|
||||
ankerl::unordered_dense::map<std::string, std::shared_ptr<VehicleModelInterface>> m_models;
|
||||
CountryParentNameGetterFn m_countryParentNameGetterFn;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user