Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -23,8 +23,7 @@ namespace generator
{
namespace
{
bool ParseMaxspeedAndWriteToStream(std::string const & maxspeed, routing::SpeedInUnits & speed,
std::ostringstream & ss)
bool ParseMaxspeedAndWriteToStream(std::string const & maxspeed, routing::SpeedInUnits & speed, std::ostringstream & ss)
{
if (maxspeed.empty() || !ParseMaxspeedTag(maxspeed, speed))
return false;
@@ -34,8 +33,7 @@ bool ParseMaxspeedAndWriteToStream(std::string const & maxspeed, routing::SpeedI
}
} // namespace
MaxspeedsCollector::MaxspeedsCollector(std::string const & filename)
: CollectorInterface(filename)
MaxspeedsCollector::MaxspeedsCollector(std::string const & filename) : CollectorInterface(filename)
{
m_stream.exceptions(std::fstream::failbit | std::fstream::badbit);
m_stream.open(GetTmpFilename());
@@ -91,11 +89,8 @@ void MaxspeedsCollector::CollectFeature(feature::FeatureBuilder const & ft, OsmE
// like "none" or "walk". In that case units mean nothing and the values should
// be processed in a special way.
routing::SpeedInUnits maxspeedBackward;
if (ParseMaxspeedTag(maxspeedBackwardStr, maxspeedBackward) &&
HaveSameUnits(maxspeed, maxspeedBackward))
{
if (ParseMaxspeedTag(maxspeedBackwardStr, maxspeedBackward) && HaveSameUnits(maxspeed, maxspeedBackward))
ss << "," << strings::to_string(maxspeedBackward.GetSpeed());
}
}
else if (ftypes::IsLinkChecker::Instance()(ft.GetTypes()))
{
@@ -132,7 +127,10 @@ void MaxspeedsCollector::Save()
CHECK(base::CopyFileX(GetTmpFilename(), GetFilename()), ());
}
void MaxspeedsCollector::OrderCollectedData() { OrderTextFileByLine(GetFilename()); }
void MaxspeedsCollector::OrderCollectedData()
{
OrderTextFileByLine(GetFilename());
}
void MaxspeedsCollector::MergeInto(MaxspeedsCollector & collector) const
{