[core] Switch to ankerl::unordered_dense

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-11-24 17:34:56 +00:00
parent 03132c6877
commit ef6522ed28
282 changed files with 4386 additions and 1456 deletions

View File

@@ -49,11 +49,13 @@ optional<Score> GetFrcScore(Graph::Edge const & e, FunctionalRoadClass functiona
switch (functionalRoadClass)
{
case FunctionalRoadClass::FRC0:
return hwClass == HighwayClass::Motorway || hwClass == HighwayClass::Trunk ? optional<Score>(kMaxScoreForFrc) : nullopt;
return hwClass == HighwayClass::Motorway || hwClass == HighwayClass::Trunk ? optional<Score>(kMaxScoreForFrc)
: nullopt;
case FunctionalRoadClass::FRC1:
return (hwClass == HighwayClass::Motorway || hwClass == HighwayClass::Trunk || hwClass == HighwayClass::Primary) ? optional<Score>(kMaxScoreForFrc)
: nullopt;
return (hwClass == HighwayClass::Motorway || hwClass == HighwayClass::Trunk || hwClass == HighwayClass::Primary)
? optional<Score>(kMaxScoreForFrc)
: nullopt;
case FunctionalRoadClass::FRC2:
case FunctionalRoadClass::FRC3:

View File

@@ -9,9 +9,10 @@
#include <cstdint>
#include <functional>
#include <string>
#include <unordered_set>
#include <vector>
#include "3party/ankerl/unordered_dense.h"
namespace openlr
{
struct LinearSegment;
@@ -35,7 +36,7 @@ public:
bool Matches(LinearSegment const & segment) const;
private:
std::unordered_set<uint32_t> m_ids;
ankerl::unordered_dense::set<uint32_t> m_ids;
bool m_idsSet;
bool const m_multipointsOnly;
};

View File

@@ -25,11 +25,12 @@
#include <cstring>
#include <fstream>
#include <string>
#include <unordered_map>
#include <vector>
#include <boost/regex.hpp>
#include "3party/ankerl/unordered_dense.h"
#include <gflags/gflags.h>
#include <pugixml.hpp>
@@ -191,7 +192,7 @@ std::vector<LinearSegment> LoadSegments(pugi::xml_document & document)
void WriteAssessmentFile(std::string const fileName, pugi::xml_document const & doc,
std::vector<DecodedPath> const & paths)
{
std::unordered_map<uint32_t, pugi::xml_node> xmlSegments;
ankerl::unordered_dense::map<uint32_t, pugi::xml_node> xmlSegments;
for (auto const & xpathNode : doc.select_nodes("//reportSegments"))
{
auto const xmlSegment = xpathNode.node();