Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10 * Reformat using clang-format-10.0.09
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ namespace
|
||||
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Boost.Assert only declares the following two functions and let's us define them here.
|
||||
namespace boost
|
||||
@@ -32,4 +32,4 @@ void assertion_failed_msg(
|
||||
{
|
||||
::assertion_failed_msg_helper(expr, msg, function, file, line);
|
||||
}
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
@@ -16,8 +16,8 @@ inline std::ostream &operator<<(std::ostream &stream, const ConditionalRestricti
|
||||
return stream << restriction.value << "=" << restriction.condition;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(osrm::util::ConditionalRestriction,
|
||||
(std::string, value)(std::string, condition))
|
||||
@@ -33,7 +33,7 @@ namespace
|
||||
{
|
||||
namespace ph = boost::phoenix;
|
||||
namespace qi = boost::spirit::qi;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
template <typename Iterator, typename Skipper = qi::blank_type>
|
||||
struct conditional_restrictions_grammar
|
||||
@@ -76,7 +76,7 @@ struct conditional_restrictions_grammar
|
||||
qi::rule<Iterator, Skipper, ConditionalRestriction()> restriction;
|
||||
qi::rule<Iterator, Skipper, std::string()> value, condition;
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
std::vector<ConditionalRestriction> ParseConditionalRestrictions(const std::string &str)
|
||||
{
|
||||
@@ -92,5 +92,5 @@ std::vector<ConditionalRestriction> ParseConditionalRestrictions(const std::stri
|
||||
return result;
|
||||
}
|
||||
|
||||
} // util
|
||||
} // osrm
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -42,5 +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); }
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -18,5 +18,5 @@ namespace util
|
||||
|
||||
void exception::anchor() const {}
|
||||
void RuntimeError::anchor() const {}
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -91,5 +91,5 @@ bool FingerPrint::IsDataCompatible(const FingerPrint &other) const
|
||||
return IsValid() && other.major_version == major_version &&
|
||||
other.minor_version == minor_version;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -17,9 +17,9 @@ NodeIdVectorToLineString::NodeIdVectorToLineString(
|
||||
}
|
||||
|
||||
// converts a vector of node ids into a linestring geojson feature
|
||||
util::json::Object NodeIdVectorToLineString::
|
||||
operator()(const std::vector<NodeID> &node_ids,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
util::json::Object
|
||||
NodeIdVectorToLineString::operator()(const std::vector<NodeID> &node_ids,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
{
|
||||
util::json::Array coordinates;
|
||||
std::transform(node_ids.begin(),
|
||||
@@ -37,9 +37,9 @@ NodeIdVectorToMultiPoint::NodeIdVectorToMultiPoint(
|
||||
{
|
||||
}
|
||||
|
||||
util::json::Object NodeIdVectorToMultiPoint::
|
||||
operator()(const std::vector<NodeID> &node_ids,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
util::json::Object
|
||||
NodeIdVectorToMultiPoint::operator()(const std::vector<NodeID> &node_ids,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
{
|
||||
util::json::Array coordinates;
|
||||
std::transform(node_ids.begin(),
|
||||
@@ -51,18 +51,18 @@ operator()(const std::vector<NodeID> &node_ids,
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
util::json::Object CoordinateVectorToMultiPoint::
|
||||
operator()(const std::vector<util::Coordinate> &input_coordinates,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
util::json::Object
|
||||
CoordinateVectorToMultiPoint::operator()(const std::vector<util::Coordinate> &input_coordinates,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
{
|
||||
const auto coordinates = makeJsonArray(input_coordinates);
|
||||
return makeFeature("MultiPoint", std::move(coordinates), properties);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
util::json::Object CoordinateVectorToLineString::
|
||||
operator()(const std::vector<util::Coordinate> &input_coordinates,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
util::json::Object
|
||||
CoordinateVectorToLineString::operator()(const std::vector<util::Coordinate> &input_coordinates,
|
||||
const boost::optional<json::Object> &properties) const
|
||||
{
|
||||
const auto coordinates = makeJsonArray(input_coordinates);
|
||||
return makeFeature("LineString", std::move(coordinates), properties);
|
||||
|
||||
@@ -25,7 +25,7 @@ void __throw_out_of_range_fmt(const char *err, ...)
|
||||
// Safe and over-simplified version. Ignore the format and print it as-is.
|
||||
__throw_out_of_range(err);
|
||||
}
|
||||
}
|
||||
} // namespace std
|
||||
#endif // _ENABLE_GLIBC_WORKAROUND
|
||||
|
||||
#endif // GLIBC_WORKAROUND
|
||||
+3
-3
@@ -22,7 +22,7 @@ static const char MAGENTA[]{"\x1b[35m"};
|
||||
// static const char GREEN[] { "\x1b[32m"};
|
||||
// static const char BLUE[] { "\x1b[34m"};
|
||||
// static const char CYAN[] { "\x1b[36m"};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void LogPolicy::Unmute() { m_is_mute = false; }
|
||||
|
||||
@@ -150,5 +150,5 @@ UnbufferedLog::UnbufferedLog(LogLevel level_)
|
||||
{
|
||||
stream.flags(std::ios_base::unitbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace
|
||||
{
|
||||
namespace ph = boost::phoenix;
|
||||
namespace qi = boost::spirit::qi;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
template <typename Iterator, typename Skipper = qi::blank_type>
|
||||
struct opening_hours_grammar : qi::grammar<Iterator, Skipper, std::vector<OpeningHours>()>
|
||||
@@ -398,7 +398,7 @@ struct opening_hours_grammar : qi::grammar<Iterator, Skipper, std::vector<Openin
|
||||
qi::uint_parser<unsigned, 10, 2, 2> uint2_p;
|
||||
qi::uint_parser<unsigned, 10, 4, 4> uint4_p;
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
std::vector<OpeningHours> ParseOpeningHours(const std::string &str)
|
||||
{
|
||||
@@ -431,5 +431,5 @@ bool CheckOpeningHours(const std::vector<OpeningHours> &input, const struct tm &
|
||||
return is_open;
|
||||
}
|
||||
|
||||
} // util
|
||||
} // osrm
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -8,5 +8,5 @@ namespace detail
|
||||
{
|
||||
std::atomic_uint operation = {0};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
@@ -162,5 +162,5 @@ boost::optional<struct tm> Timezoner::operator()(const point_t &point) const
|
||||
}
|
||||
return boost::none;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace updater
|
||||
} // namespace osrm
|
||||
|
||||
Reference in New Issue
Block a user