Apply clang-tidy
This commit is contained in:
parent
4ca29dd18e
commit
552cdbfe20
@ -2,7 +2,7 @@
|
||||
#define ROUTED_OPTIONS_HPP
|
||||
|
||||
#include "util/version.hpp"
|
||||
#include "util/ini_file.hpp"
|
||||
#include "util/version.hpp"
|
||||
#include "util/osrm_exception.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include "osrm/coordinate.hpp"
|
||||
|
||||
#include <random>
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
|
||||
// Choosen by a fair W20 dice roll (this value is completely arbitrary)
|
||||
constexpr unsigned RANDOM_SEED = 13;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "contractor/contractor_options.hpp"
|
||||
|
||||
#include "util/version.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/version.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
|
@ -27,9 +27,9 @@ class named_mutex;
|
||||
#include <boost/interprocess/sync/named_condition.hpp>
|
||||
#include <boost/interprocess/sync/scoped_lock.hpp>
|
||||
|
||||
#include "osrm/route_parameters.hpp"
|
||||
#include "osrm/libosrm_config.hpp"
|
||||
#include "osrm/osrm.hpp"
|
||||
#include "osrm/route_parameters.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "engine/phantom_node.hpp"
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
#include "extractor/travel_mode.hpp"
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
#include "osrm/coordinate.hpp"
|
||||
|
||||
#include <limits>
|
||||
|
@ -50,7 +50,7 @@ void RouteParameters::setAllUTurns(const bool flag)
|
||||
}
|
||||
}
|
||||
|
||||
void RouteParameters::setDeprecatedAPIFlag(const std::string &) { deprecatedAPI = true; }
|
||||
void RouteParameters::setDeprecatedAPIFlag(const std::string & /*unused*/) { deprecatedAPI = true; }
|
||||
|
||||
void RouteParameters::setChecksum(const unsigned sum) { check_sum = sum; }
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#include <luabind/luabind.hpp>
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
#include "util/static_graph.hpp"
|
||||
#include "util/static_rtree.hpp"
|
||||
#include "extractor/restriction_map.hpp"
|
||||
#include "extractor/compressed_edge_container.hpp"
|
||||
#include "extractor/restriction_map.hpp"
|
||||
|
||||
#include "extractor/tarjan_scc.hpp"
|
||||
#include "contractor/crc32_processor.hpp"
|
||||
@ -573,7 +573,7 @@ void extractor::BuildRTree(std::vector<EdgeBasedNode> node_based_edge_list,
|
||||
node_based_edge_list.resize(new_size);
|
||||
|
||||
TIMER_START(construction);
|
||||
StaticRTree<EdgeBasedNode>(node_based_edge_list, config.rtree_nodes_output_path,
|
||||
StaticRTree<EdgeBasedNode> rtree(node_based_edge_list, config.rtree_nodes_output_path,
|
||||
config.rtree_leafs_output_path, internal_to_external_node_map);
|
||||
|
||||
TIMER_STOP(construction);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "extractor/extractor_options.hpp"
|
||||
|
||||
#include "util/version.hpp"
|
||||
#include "util/ini_file.hpp"
|
||||
#include "util/version.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "extractor/graph_compressor.hpp"
|
||||
|
||||
#include "extractor/compressed_edge_container.hpp"
|
||||
#include "extractor/restriction_map.hpp"
|
||||
#include "util/dynamic_graph.hpp"
|
||||
#include "util/node_based_graph.hpp"
|
||||
#include "extractor/restriction_map.hpp"
|
||||
#include "util/percent.hpp"
|
||||
|
||||
#include "util/simple_logger.hpp"
|
||||
|
@ -149,9 +149,5 @@ bool RestrictionMap::CheckIfTurnIsRestricted(const NodeID node_u,
|
||||
// check of node is the start of any restriction
|
||||
bool RestrictionMap::IsSourceNode(const NodeID node) const
|
||||
{
|
||||
if (m_restriction_start_nodes.find(node) == m_restriction_start_nodes.end())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return m_restriction_start_nodes.find(node) != m_restriction_start_nodes.end();
|
||||
}
|
||||
|
@ -9,9 +9,9 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/regex.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/optional/optional.hpp>
|
||||
|
||||
#include <osmium/osm.hpp>
|
||||
#include <osmium/tags/regex_filter.hpp>
|
||||
@ -218,12 +218,8 @@ bool RestrictionParser::ShouldIgnoreRestriction(const std::string &except_tag_st
|
||||
return std::any_of(std::begin(exceptions), std::end(exceptions),
|
||||
[&](const std::string ¤t_string)
|
||||
{
|
||||
if (std::end(restriction_exceptions) !=
|
||||
return std::end(restriction_exceptions) !=
|
||||
std::find(std::begin(restriction_exceptions),
|
||||
std::end(restriction_exceptions), current_string))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
std::end(restriction_exceptions), current_string);
|
||||
});
|
||||
}
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
#include <ostream>
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
|
@ -6,15 +6,15 @@
|
||||
#include "util/shared_memory_vector_wrapper.hpp"
|
||||
#include "util/static_graph.hpp"
|
||||
#include "util/static_rtree.hpp"
|
||||
#include "engine/datafacade/datafacade_base.hpp"
|
||||
#include "extractor/travel_mode.hpp"
|
||||
#include "extractor/turn_instructions.hpp"
|
||||
#include "engine/datafacade/datafacade_base.hpp"
|
||||
#include "engine/datafacade/shared_datatype.hpp"
|
||||
#include "engine/datafacade/shared_barriers.hpp"
|
||||
#include "util/datastore_options.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/osrm_exception.hpp"
|
||||
#include "util/fingerprint.hpp"
|
||||
#include "util/osrm_exception.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include "osrm/coordinate.hpp"
|
||||
@ -33,8 +33,8 @@ using QueryGraph = StaticGraph<QueryEdge::EdgeData>;
|
||||
#include <cstdint>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <new>
|
||||
#include <string>
|
||||
|
||||
// delete a shared memory region. report warning if it could not be deleted
|
||||
void delete_region(const SharedDataType region)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "server/server.hpp"
|
||||
#include "util/version.hpp"
|
||||
#include "util/ini_file.hpp"
|
||||
#include "util/routed_options.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
#include <chrono>
|
||||
#include <future>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <new>
|
||||
#include <thread>
|
||||
|
||||
#ifdef _WIN32
|
||||
boost::function0<void> console_ctrl_function;
|
||||
|
@ -36,12 +36,8 @@ FixedPointCoordinate::FixedPointCoordinate(int lat, int lon) : lat(lat), lon(lon
|
||||
|
||||
bool FixedPointCoordinate::is_valid() const
|
||||
{
|
||||
if (lat > 90 * COORDINATE_PRECISION || lat < -90 * COORDINATE_PRECISION ||
|
||||
lon > 180 * COORDINATE_PRECISION || lon < -180 * COORDINATE_PRECISION)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !(lat > 90 * COORDINATE_PRECISION || lat < -90 * COORDINATE_PRECISION ||
|
||||
lon > 180 * COORDINATE_PRECISION || lon < -180 * COORDINATE_PRECISION);
|
||||
}
|
||||
|
||||
bool FixedPointCoordinate::operator==(const FixedPointCoordinate &other) const
|
||||
|
Loading…
Reference in New Issue
Block a user