[core] Implicit m2::Point hash

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-11-24 17:34:56 +00:00
committed by Konstantin Pastbin
parent 650f0ca120
commit eb28c50161
5 changed files with 24 additions and 11 deletions

View File

@@ -5,11 +5,12 @@
#include <cstddef>
#include <cstdint>
#include <map>
#include <optional>
#include <utility>
#include <vector>
#include "3party/skarupke/flat_hash_map.hpp"
namespace generator
{
namespace cells_merger
@@ -67,7 +68,7 @@ private:
m2::RectD Union(m2::PointI const & startXy);
void Remove(m2::PointI const & minXy, m2::PointI const & maxXy);
std::map<m2::PointI, CellWrapper> m_matrix;
ska::flat_hash_map<m2::PointI, CellWrapper> m_matrix;
int32_t m_maxX = 0;
int32_t m_maxY = 0;
};

View File

@@ -27,10 +27,11 @@
#include "defines.hpp"
#include <map>
#include <string>
#include <vector>
#include "3party/skarupke/flat_hash_map.hpp"
namespace altitude_test
{
using namespace feature;
@@ -72,7 +73,7 @@ TPoint3DList const kRoad4 = {{-10, 1, -1}, {-20, 6, -100}, {-20, -11, -110}};
class MockAltitudeGetter : public AltitudeGetter
{
public:
using TMockAltitudes = std::map<m2::PointI, geometry::Altitude>;
using TMockAltitudes = ska::flat_hash_map<m2::PointI, geometry::Altitude>;
explicit MockAltitudeGetter(std::vector<TPoint3DList> const & roads)
{