Run clang-format
This commit is contained in:
@@ -90,7 +90,6 @@ inline bool CheckInBounds(const int A, const int B, const int range)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,6 @@ class BinaryHeap
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ template <typename T, int Precision = 6> inline std::string to_string_with_preci
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ struct ComputeAngle
|
||||
const FixedPointCoordinate &second,
|
||||
const FixedPointCoordinate &third) noexcept;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ double radToDeg(const double radian);
|
||||
double bearing(const FixedPointCoordinate &first_coordinate,
|
||||
const FixedPointCoordinate &second_coordinate);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,6 @@ bool GenerateDataStoreOptions(const int argc,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -306,8 +306,7 @@ class DeallocatingVector
|
||||
else
|
||||
{ // down-size
|
||||
const std::size_t number_of_necessary_buckets = 1 + (new_size / ELEMENTS_PER_BLOCK);
|
||||
for (const auto bucket_index :
|
||||
irange(number_of_necessary_buckets, bucket_list.size()))
|
||||
for (const auto bucket_index : irange(number_of_necessary_buckets, bucket_list.size()))
|
||||
{
|
||||
if (nullptr != bucket_list[bucket_index])
|
||||
{
|
||||
@@ -378,7 +377,6 @@ void swap(DeallocatingVector<T, S> &lhs, DeallocatingVector<T, S> &rhs)
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ inline void DEBUG_SIGNAL(const NodeID /* node */,
|
||||
}
|
||||
|
||||
inline void DEBUG_TURNS_STOP() {}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +59,6 @@ namespace osrm
|
||||
namespace util
|
||||
{
|
||||
|
||||
|
||||
boost::filesystem::ofstream debug_geometry_file;
|
||||
bool dg_output_debug_geometry = false;
|
||||
bool dg_first_debug_geometry = true;
|
||||
@@ -207,7 +205,6 @@ inline void DEBUG_TURNS_STOP()
|
||||
dg_debug_turns_file.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ template <typename T> class DistTableWrapper
|
||||
std::vector<T> table_;
|
||||
const std::size_t number_of_nodes_;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ template <typename EdgeDataT> class DynamicGraph
|
||||
for (const auto node : irange(0u, number_of_nodes))
|
||||
{
|
||||
for (const auto i : irange(node_array[node].first_edge,
|
||||
node_array[node].first_edge + node_array[node].edges))
|
||||
node_array[node].first_edge + node_array[node].edges))
|
||||
{
|
||||
edge_list[i].target = graph[edge].target;
|
||||
BOOST_ASSERT(edge_list[i].target < number_of_nodes);
|
||||
@@ -320,7 +320,6 @@ template <typename EdgeDataT> class DynamicGraph
|
||||
std::vector<Node> node_array;
|
||||
DeallocatingVector<Edge> edge_list;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ class FingerPrint
|
||||
};
|
||||
|
||||
static_assert(std::is_trivial<FingerPrint>::value, "FingerPrint needs to be trivial.");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,6 @@ class FixedPointNumber
|
||||
};
|
||||
|
||||
static_assert(4 == sizeof(FixedPointNumber<1>), "FP19 has wrong size != 4");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ template <typename FloatT> bool epsilon_compare(const FloatT number1, const Floa
|
||||
static_assert(std::is_floating_point<FloatT>::value, "type must be floating point");
|
||||
return (std::abs(number1 - number2) < std::numeric_limits<FloatT>::epsilon());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@ NodeID loadNodesFromFile(std::istream &input_stream,
|
||||
extractor::ExternalMemoryNode current_node;
|
||||
for (NodeID i = 0; i < n; ++i)
|
||||
{
|
||||
input_stream.read(reinterpret_cast<char *>(¤t_node), sizeof(extractor::ExternalMemoryNode));
|
||||
input_stream.read(reinterpret_cast<char *>(¤t_node),
|
||||
sizeof(extractor::ExternalMemoryNode));
|
||||
node_array.emplace_back(current_node.lat, current_node.lon, current_node.node_id);
|
||||
if (current_node.barrier)
|
||||
{
|
||||
@@ -106,7 +107,8 @@ NodeID loadNodesFromFile(std::istream &input_stream,
|
||||
/**
|
||||
* Reads a .osrm file and produces the edges.
|
||||
*/
|
||||
NodeID loadEdgesFromFile(std::istream &input_stream, std::vector<extractor::NodeBasedEdge> &edge_list)
|
||||
NodeID loadEdgesFromFile(std::istream &input_stream,
|
||||
std::vector<extractor::NodeBasedEdge> &edge_list)
|
||||
{
|
||||
EdgeID m;
|
||||
input_stream.read(reinterpret_cast<char *>(&m), sizeof(unsigned));
|
||||
@@ -196,7 +198,6 @@ unsigned readHSGRFromStream(const boost::filesystem::path &hsgr_file,
|
||||
|
||||
return number_of_nodes;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ class HilbertCode
|
||||
inline uint64_t BitInterleaving(const uint32_t a, const uint32_t b) const;
|
||||
inline void TransposeCoordinate(uint32_t *X) const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ irange(const Integer first,
|
||||
{
|
||||
return range<Integer>(first, last);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ template <typename Iterator> struct iso_8601_grammar : qi::grammar<Iterator>
|
||||
return temp;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ class Logger
|
||||
|
||||
boost::thread_specific_ptr<MapT> map;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,15 +59,13 @@ template <> Array make_array(const std::vector<bool> &vector)
|
||||
// Easy acces to object hierachies
|
||||
Value &get(Value &value) { return value; }
|
||||
|
||||
template <typename... Keys>
|
||||
Value &get(Value &value, const char *key, Keys... keys)
|
||||
template <typename... Keys> Value &get(Value &value, const char *key, Keys... keys)
|
||||
{
|
||||
using recursive_object_t = mapbox::util::recursive_wrapper<Object>;
|
||||
return get(value.get<recursive_object_t>().get().values[key], keys...);
|
||||
}
|
||||
|
||||
template <typename... Keys>
|
||||
Value &get(Value &value, unsigned key, Keys... keys)
|
||||
template <typename... Keys> Value &get(Value &value, unsigned key, Keys... keys)
|
||||
{
|
||||
using recursive_array_t = mapbox::util::recursive_wrapper<Array>;
|
||||
return get(value.get<recursive_array_t>().get().values[key], keys...);
|
||||
|
||||
@@ -39,7 +39,6 @@ inline void luaAddScriptFolderToLoadPath(lua_State *lua_state, const char *file_
|
||||
const std::string lua_code = "package.path = \"" + folder + "/?.lua;\" .. package.path";
|
||||
luaL_dostring(lua_state, lua_code.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ make_unique(size_t n)
|
||||
/// This function isn't used and is only here to provide better compile errors.
|
||||
template <class T, class... Args>
|
||||
typename std::enable_if<std::extent<T>::value != 0>::type make_unique(Args &&...) = delete;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ struct MatchingDebugInfo
|
||||
state.values["transitions"] = json::Array();
|
||||
state.values["coordinate"] =
|
||||
json::make_array(elem_s.phantom_node.location.lat / COORDINATE_PRECISION,
|
||||
elem_s.phantom_node.location.lon / COORDINATE_PRECISION);
|
||||
elem_s.phantom_node.location.lon / COORDINATE_PRECISION);
|
||||
state.values["viterbi"] =
|
||||
json::clamp_float(engine::map_matching::IMPOSSIBLE_LOG_PROB);
|
||||
state.values["pruned"] = 0u;
|
||||
@@ -129,7 +129,6 @@ struct MatchingDebugInfo
|
||||
const json::Logger *logger;
|
||||
json::Value *object;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace osrm
|
||||
namespace util
|
||||
{
|
||||
|
||||
// This Wrapper provides all methods that are needed for extractor::TarjanSCC, when the graph is given in a
|
||||
// This Wrapper provides all methods that are needed for extractor::TarjanSCC, when the graph is
|
||||
// given in a
|
||||
// matrix representation (e.g. as output from a distance table call)
|
||||
|
||||
template <typename T> class MatrixGraphWrapper
|
||||
@@ -44,7 +45,6 @@ template <typename T> class MatrixGraphWrapper
|
||||
const std::vector<T> table_;
|
||||
const std::size_t number_of_nodes_;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ struct mercator
|
||||
|
||||
static double lat2y(const double latitude) noexcept;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ NodeBasedDynamicGraphFromEdges(std::size_t number_of_nodes,
|
||||
const std::vector<extractor::NodeBasedEdge> &input_edge_list)
|
||||
{
|
||||
auto edges_list = directedEdgesFromCompressed<NodeBasedDynamicGraph::InputEdge>(
|
||||
input_edge_list,
|
||||
[](NodeBasedDynamicGraph::InputEdge &output_edge, const extractor::NodeBasedEdge &input_edge)
|
||||
input_edge_list, [](NodeBasedDynamicGraph::InputEdge &output_edge,
|
||||
const extractor::NodeBasedEdge &input_edge)
|
||||
{
|
||||
output_edge.data.distance = static_cast<int>(input_edge.weight);
|
||||
BOOST_ASSERT(output_edge.data.distance > 0);
|
||||
@@ -83,7 +83,6 @@ NodeBasedDynamicGraphFromEdges(std::size_t number_of_nodes,
|
||||
|
||||
return graph;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ class exception final : public std::exception
|
||||
const char *what() const noexcept override { return message.c_str(); }
|
||||
const std::string message;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ class Percent
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ auto max_element(const Container &c) -> decltype(std::max_element(c.cbegin(), c.
|
||||
{
|
||||
return std::max_element(c.cbegin(), c.cend());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,6 @@ std::istream &operator>>(std::istream &in, RangeTable<BLOCK_SIZE, USE_SHARED_MEM
|
||||
in.read((char *)table.diff_blocks.data(), BLOCK_SIZE * number_of_blocks);
|
||||
return in;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,15 +148,15 @@ struct RectangleInt2D
|
||||
const FixedPointCoordinate lower_right(min_lat, max_lon);
|
||||
const FixedPointCoordinate lower_left(min_lat, min_lon);
|
||||
|
||||
min_max_dist = std::min(
|
||||
min_max_dist,
|
||||
std::max(coordinate_calculation::greatCircleDistance(location, upper_left),
|
||||
coordinate_calculation::greatCircleDistance(location, upper_right)));
|
||||
min_max_dist =
|
||||
std::min(min_max_dist,
|
||||
std::max(coordinate_calculation::greatCircleDistance(location, upper_left),
|
||||
coordinate_calculation::greatCircleDistance(location, upper_right)));
|
||||
|
||||
min_max_dist = std::min(
|
||||
min_max_dist,
|
||||
std::max(coordinate_calculation::greatCircleDistance(location, upper_right),
|
||||
coordinate_calculation::greatCircleDistance(location, lower_right)));
|
||||
min_max_dist =
|
||||
std::min(min_max_dist,
|
||||
std::max(coordinate_calculation::greatCircleDistance(location, upper_right),
|
||||
coordinate_calculation::greatCircleDistance(location, lower_right)));
|
||||
|
||||
min_max_dist =
|
||||
std::min(min_max_dist,
|
||||
@@ -177,7 +177,6 @@ struct RectangleInt2D
|
||||
return lats_contained && lons_contained;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,6 @@ GenerateServerProgramOptions(const int argc,
|
||||
SimpleLogger().Write() << visible_options;
|
||||
return INIT_OK_DO_NOT_START_ENGINE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ template <typename DataT, bool UseSharedMemory> struct ShM
|
||||
SharedMemoryWrapper<DataT>,
|
||||
std::vector<DataT>>::type;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ class SimpleLogger
|
||||
std::ostringstream os;
|
||||
LogLevel level;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,6 @@ template <typename EdgeDataT, bool UseSharedMemory = false> class StaticGraph
|
||||
typename ShM<NodeArrayEntry, UseSharedMemory>::vector node_array;
|
||||
typename ShM<EdgeArrayEntry, UseSharedMemory>::vector edge_array;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,6 @@ inline std::size_t URIDecode(const std::string &input, std::string &output)
|
||||
}
|
||||
|
||||
inline std::size_t URIDecodeInPlace(std::string &URI) { return URIDecode(URI, URI); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ class GlobalTimerFactory
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(_X##_stop - _X##_start).count())
|
||||
#define TIMER_MIN(_X) \
|
||||
std::chrono::duration_cast<std::chrono::minutes>(_X##_stop - _X##_start).count()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ enum class tribool : char
|
||||
no,
|
||||
indeterminate
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif // TRIBOOL_HPP
|
||||
|
||||
@@ -422,7 +422,6 @@ inline double atan2_lookup(double y, double x)
|
||||
}
|
||||
return angle;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ class XORMiniHash
|
||||
return table1[byte1] ^ table2[byte2] ^ table3[byte3] ^ table4[byte4];
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ template <typename NodeID, typename Key> class XORFastHashStorage
|
||||
XORFastHash fast_hasher;
|
||||
unsigned current_timestamp;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user