Replace boost::hash by std::hash (#6892)
* Replace boost::hash by std::hash * Fix formatting * Update CHANGELOG.md
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include "util/timing_util.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "util/for_each_indexed.hpp"
|
||||
#include "util/for_each_pair.hpp"
|
||||
#include "util/log.hpp"
|
||||
#include "util/std_hash.hpp"
|
||||
#include "util/timing_util.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
@@ -955,8 +956,7 @@ void ExtractionContainers::PrepareTrafficSignals(
|
||||
TIMER_START(prepare_traffic_signals);
|
||||
|
||||
std::unordered_set<NodeID> bidirectional;
|
||||
std::unordered_set<std::pair<NodeID, NodeID>, boost::hash<std::pair<NodeID, NodeID>>>
|
||||
unidirectional;
|
||||
std::unordered_set<std::pair<NodeID, NodeID>> unidirectional;
|
||||
|
||||
for (const auto &osm_node : bidirectional_signal_nodes)
|
||||
{
|
||||
|
||||
+1
-19
@@ -18,6 +18,7 @@
|
||||
#include "util/mmap_tar.hpp"
|
||||
#include "util/opening_hours.hpp"
|
||||
#include "util/static_rtree.hpp"
|
||||
#include "util/std_hash.hpp"
|
||||
#include "util/string_util.hpp"
|
||||
#include "util/timezones.hpp"
|
||||
#include "util/timing_util.hpp"
|
||||
@@ -42,25 +43,6 @@
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <typename T1, typename T2, typename T3> struct hash<std::tuple<T1, T2, T3>>
|
||||
{
|
||||
size_t operator()(const std::tuple<T1, T2, T3> &t) const
|
||||
{
|
||||
return hash_val(std::get<0>(t), std::get<1>(t), std::get<2>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T1, typename T2> struct hash<std::tuple<T1, T2>>
|
||||
{
|
||||
size_t operator()(const std::tuple<T1, T2> &t) const
|
||||
{
|
||||
return hash_val(std::get<0>(t), std::get<1>(t));
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
namespace osrm::updater
|
||||
{
|
||||
namespace
|
||||
|
||||
Reference in New Issue
Block a user