Readded updater

Must have been lost while concating everything into one commit
This commit is contained in:
Mugr Rex 2023-04-24 19:10:04 +02:00
parent 23fb96c4f2
commit 5b23b11129
2 changed files with 5 additions and 6 deletions

View File

@ -39,7 +39,7 @@ template <typename Key, typename Value> struct CSVFilesParser
{ {
} }
// Operator returns a lambda function that maps input Key to boost::optional<Value>. // Operator returns a lambda function that maps input Key to std::optional<Value>.
auto operator()(const std::vector<std::string> &csv_filenames) const auto operator()(const std::vector<std::string> &csv_filenames) const
{ {
try try

View File

@ -3,8 +3,7 @@
#include "util/typedefs.hpp" #include "util/typedefs.hpp"
#include <boost/optional.hpp> #include <optional>
#include <vector> #include <vector>
namespace osrm::updater namespace osrm::updater
@ -12,9 +11,9 @@ namespace osrm::updater
template <typename Key, typename Value> struct LookupTable template <typename Key, typename Value> struct LookupTable
{ {
boost::optional<Value> operator()(const Key &key) const std::optional<Value> operator()(const Key &key) const
{ {
using Result = boost::optional<Value>; using Result = std::optional<Value>;
const auto it = std::lower_bound( const auto it = std::lower_bound(
lookup.begin(), lookup.end(), key, [](const auto &lhs, const auto &rhs) { lookup.begin(), lookup.end(), key, [](const auto &lhs, const auto &rhs) {
return rhs < lhs.first; return rhs < lhs.first;
@ -49,7 +48,7 @@ struct SpeedSource final
{ {
SpeedSource() : speed(0.), rate() {} SpeedSource() : speed(0.), rate() {}
double speed; double speed;
boost::optional<double> rate; std::optional<double> rate;
std::uint8_t source; std::uint8_t source;
}; };