Fix formating

This commit is contained in:
Patrick Niklaus 2018-02-05 11:40:18 +00:00 committed by Patrick Niklaus
parent 71cfb03738
commit b4cfc8d6e0
22 changed files with 47 additions and 54 deletions

View File

@ -16,10 +16,10 @@ namespace datafacade
{
/**
* This allocator uses an IPC shared memory block as the data location.
* Many SharedMemoryDataFacade objects can be created that point to the same shared
* memory block.
*/
* This allocator uses an IPC shared memory block as the data location.
* Many SharedMemoryDataFacade objects can be created that point to the same shared
* memory block.
*/
class SharedMemoryAllocator : public ContiguousBlockAllocator
{
public:

View File

@ -30,9 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "extractor/travel_mode.hpp"
#include "util/typedefs.hpp"
#include "util/bearing.hpp"
#include "util/coordinate.hpp"
#include "util/typedefs.hpp"
#include <boost/assert.hpp>
@ -195,7 +195,6 @@ struct PhantomNodes
PhantomNode source_phantom;
PhantomNode target_phantom;
};
}
}

View File

@ -35,10 +35,10 @@ template <typename Iterator> struct iso_8601_grammar : qi::grammar<Iterator, uns
using qi::_c;
using qi::_pass;
using qi::_val;
using qi::char_;
using qi::eoi;
using qi::eps;
using qi::uint_;
using qi::char_;
hh = uint2_p[_pass = bind([](unsigned x) { return x < 24; }, _1), _val = _1];
mm = uint2_p[_pass = bind([](unsigned x) { return x < 60; }, _1), _val = _1];

View File

@ -67,9 +67,8 @@ struct TurnLaneDescription_hash
}
};
using LaneDescriptionMap = util::ConcurrentIDMap<TurnLaneDescription,
LaneDescriptionID,
TurnLaneDescription_hash>;
using LaneDescriptionMap =
util::ConcurrentIDMap<TurnLaneDescription, LaneDescriptionID, TurnLaneDescription_hash>;
using TurnLanesIndexedArray =
std::tuple<std::vector<std::uint32_t>, std::vector<TurnLaneType::Mask>>;

View File

@ -13,8 +13,8 @@ using extractor::intersection::STRAIGHT_ANGLE;
// if a turn deviates this much from going straight, it will be kept straight
using extractor::intersection::MAXIMAL_ALLOWED_NO_TURN_DEVIATION;
// angle that lies between two nearly indistinguishable roads
using extractor::intersection::NARROW_TURN_ANGLE;
using extractor::intersection::GROUP_ANGLE;
using extractor::intersection::NARROW_TURN_ANGLE;
// angle difference that can be classified as straight, if its the only narrow turn
using extractor::intersection::FUZZY_ANGLE_DIFFERENCE;

View File

@ -33,12 +33,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace osrm
{
using util::Coordinate;
using util::toFixed;
using util::toFloating;
using util::FixedLatitude;
using util::FixedLongitude;
using util::FloatLatitude;
using util::FloatLongitude;
using util::toFixed;
using util::toFloating;
}
#endif

View File

@ -32,8 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace osrm
{
using util::exception;
using util::RuntimeError;
using util::exception;
}
#endif

View File

@ -38,12 +38,12 @@ namespace osrm
{
namespace json = util::json;
using engine::EngineConfig;
using engine::api::MatchParameters;
using engine::api::NearestParameters;
using engine::api::RouteParameters;
using engine::api::TableParameters;
using engine::api::NearestParameters;
using engine::api::TripParameters;
using engine::api::MatchParameters;
using engine::api::TileParameters;
using engine::api::TripParameters;
/**
* Represents a Open Source Routing Machine with access to its services.

View File

@ -94,7 +94,6 @@ inline std::ostream &operator<<(std::ostream &out, const IntersectionViewData &v
}
}
namespace TurnLaneType
{
inline std::ostream &operator<<(std::ostream &out, const Mask lane_type)
@ -185,7 +184,6 @@ inline std::ostream &operator<<(std::ostream &out, const LaneDataVector &turn_la
return out;
}
}
}
}

View File

@ -1,8 +1,8 @@
#ifndef OSRM_UTIL_RECTANGLE_HPP
#define OSRM_UTIL_RECTANGLE_HPP
#include "util/coordinate_calculation.hpp"
#include "util/coordinate.hpp"
#include "util/coordinate_calculation.hpp"
#include <boost/assert.hpp>

View File

@ -28,5 +28,4 @@ inline std::string toOSMLink(const util::Coordinate &c)
}
}
#endif

View File

@ -519,9 +519,10 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
&scripting_environment,
weight_multiplier,
&conditional_restriction_map](
// what nodes will be used? In most cases this will be the id stored in the edge_data.
// In case of duplicated nodes (e.g. due to via-way restrictions), one/both of these
// might refer to a newly added edge based node
// what nodes will be used? In most cases this will be the id
// stored in the edge_data. In case of duplicated nodes (e.g.
// due to via-way restrictions), one/both of these might
// refer to a newly added edge based node
const auto edge_based_node_from,
const auto edge_based_node_to,
// the situation of the turn

View File

@ -186,9 +186,9 @@ void GraphCompressor::Compress(
const auto selectAnnotation = [&node_data_container](
const AnnotationID front_annotation, const AnnotationID back_annotation) {
// A lane has tags: u - (front) - v - (back) - w
// During contraction, we keep only one of the tags. Usually the one closer to
// the intersection is preferred. If its empty, however, we keep the non-empty
// one
// During contraction, we keep only one of the tags. Usually the one closer
// to the intersection is preferred. If its empty, however, we keep the
// non-empty one
if (node_data_container[back_annotation].lane_description_id ==
INVALID_LANE_DESCRIPTIONID)
return front_annotation;

View File

@ -115,8 +115,8 @@ std::pair<bool, double> findMergedBearing(const util::NodeBasedDynamicGraph &gra
// Function returns a pair with a flag and a value of bearing for merged roads
// If the flag is false the bearing must not be used as a merged value at neighbor intersections
using util::bearing::angleBetween;
using util::angularDeviation;
using util::bearing::angleBetween;
const auto &lhs = edge_geometries[lhs_index];
const auto &rhs = edge_geometries[rhs_index];

View File

@ -11,8 +11,8 @@
#include <boost/assert.hpp>
using osrm::util::angularDeviation;
using osrm::guidance::getTurnDirection;
using osrm::util::angularDeviation;
namespace osrm
{

View File

@ -211,9 +211,7 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const
std::unordered_set<unsigned> connected_names;
const auto getNextOnRoundabout = [this, &roundabout_name_ids, &connected_names](
const NodeID node,
const bool roundabout,
const bool circular) {
const NodeID node, const bool roundabout, const bool circular) {
BOOST_ASSERT(roundabout != circular);
EdgeID continue_edge = SPECIAL_EDGEID;
for (const auto edge_id : node_based_graph.GetAdjacentEdgeRange(node))

View File

@ -70,27 +70,27 @@ LaneDataVector laneDataFromDescription(TurnLaneDescription turn_lane_description
// TODO need to handle cases that have none-in between two identical values
const auto num_lanes = boost::numeric_cast<LaneID>(turn_lane_description.size());
const auto setLaneData = [&](
LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) {
const auto isSet = [&](const TurnLaneType::Mask test_mask) -> bool {
return (test_mask & full_mask) == test_mask;
};
const auto setLaneData =
[&](LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) {
const auto isSet = [&](const TurnLaneType::Mask test_mask) -> bool {
return (test_mask & full_mask) == test_mask;
};
for (const auto shift : util::irange<std::size_t>(0, TurnLaneType::NUM_TYPES))
{
TurnLaneType::Mask mask = 1 << shift;
if (isSet(mask))
for (const auto shift : util::irange<std::size_t>(0, TurnLaneType::NUM_TYPES))
{
auto map_iterator = map.find(mask);
if (map_iterator == map.end())
map[mask] = std::make_pair(current_lane, current_lane);
else
TurnLaneType::Mask mask = 1 << shift;
if (isSet(mask))
{
map_iterator->second.first = current_lane;
auto map_iterator = map.find(mask);
if (map_iterator == map.end())
map[mask] = std::make_pair(current_lane, current_lane);
else
{
map_iterator->second.first = current_lane;
}
}
}
}
};
};
LaneMap lane_map;
LaneID lane_nr = num_lanes - 1;

View File

@ -83,8 +83,8 @@ inline unsigned generateServerProgramOptions(const int argc,
EngineConfig &config,
int &requested_thread_num)
{
using boost::program_options::value;
using boost::filesystem::path;
using boost::program_options::value;
const auto hardware_threads = std::max<int>(1, std::thread::hardware_concurrency());

View File

@ -42,6 +42,5 @@ bool operator==(const FloatCoordinate lhs, const FloatCoordinate rhs)
bool operator!=(const Coordinate lhs, const Coordinate rhs) { return !(lhs == rhs); }
bool operator!=(const FloatCoordinate lhs, const FloatCoordinate rhs) { return !(lhs == rhs); }
}
}

View File

@ -137,12 +137,12 @@ struct opening_hours_grammar : qi::grammar<Iterator, Skipper, std::vector<Openin
using qi::_a;
using qi::_b;
using qi::_c;
using qi::_r1;
using qi::_pass;
using qi::_r1;
using qi::_val;
using qi::char_;
using qi::eoi;
using qi::lit;
using qi::char_;
using qi::uint_;
using oh = osrm::util::OpeningHours;

View File

@ -3,8 +3,8 @@
#include "util/bearing.hpp"
#include "util/coordinate_calculation.hpp"
#include "util/web_mercator.hpp"
#include "util/debug.hpp"
#include "util/web_mercator.hpp"
#include <osrm/coordinate.hpp>

View File

@ -8,8 +8,8 @@ BOOST_AUTO_TEST_SUITE(opening_hours)
// Some tests from https://www.netzwolf.info/en/cartography/osm/time_domain/explanation
using osrm::util::ParseOpeningHours;
using osrm::util::CheckOpeningHours;
using osrm::util::ParseOpeningHours;
// convert a string representation of time to a tm structure
struct tm time(const char *str)