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

@@ -16,31 +16,27 @@ void ForEachWayFromFile(std::string const & filename, ToDo && toDo)
{
using namespace generator;
CHECK(ForEachOsmId2FeatureId(filename,
[&](CompositeId const & compositeOsmId, uint32_t featureId)
{
auto const osmId = compositeOsmId.m_mainId;
if (osmId.GetType() == base::GeoObjectId::Type::ObsoleteOsmWay)
toDo(featureId, osmId);
}), ("Can't load osm id mapping from", filename));
[&](CompositeId const & compositeOsmId, uint32_t featureId)
{
auto const osmId = compositeOsmId.m_mainId;
if (osmId.GetType() == base::GeoObjectId::Type::ObsoleteOsmWay)
toDo(featureId, osmId);
}),
("Can't load osm id mapping from", filename));
}
void AddFeatureId(base::GeoObjectId osmId, uint32_t featureId,
OsmIdToFeatureIds & osmIdToFeatureIds)
void AddFeatureId(base::GeoObjectId osmId, uint32_t featureId, OsmIdToFeatureIds & osmIdToFeatureIds)
{
osmIdToFeatureIds[osmId].push_back(featureId);
}
void ParseWaysOsmIdToFeatureIdMapping(std::string const & osmIdsToFeatureIdPath,
OsmIdToFeatureIds & osmIdToFeatureIds)
void ParseWaysOsmIdToFeatureIdMapping(std::string const & osmIdsToFeatureIdPath, OsmIdToFeatureIds & osmIdToFeatureIds)
{
ForEachWayFromFile(osmIdsToFeatureIdPath, [&](uint32_t featureId, base::GeoObjectId osmId)
{
AddFeatureId(osmId, featureId, osmIdToFeatureIds);
});
{ AddFeatureId(osmId, featureId, osmIdToFeatureIds); });
}
void ParseWaysFeatureIdToOsmIdMapping(std::string const & osmIdsToFeatureIdPath,
FeatureIdToOsmId & featureIdToOsmId)
void ParseWaysFeatureIdToOsmIdMapping(std::string const & osmIdsToFeatureIdPath, FeatureIdToOsmId & featureIdToOsmId)
{
featureIdToOsmId.clear();
@@ -63,14 +59,12 @@ public:
ParseWaysOsmIdToFeatureIdMapping(osmIdsToFeatureIdsPath, m_osm2features);
}
virtual void ForEachFeature(uint64_t wayID, std::function<void (uint32_t)> const & fn) override
virtual void ForEachFeature(uint64_t wayID, std::function<void(uint32_t)> const & fn) override
{
auto it = m_osm2features.find(base::MakeOsmWay(wayID));
if (it != m_osm2features.end())
{
for (uint32_t featureID : it->second)
fn(featureID);
}
}
virtual void ForEachNodeIdx(uint64_t wayID, uint32_t candidateIdx, m2::PointU pt,
@@ -125,8 +119,8 @@ public:
}
};
std::unique_ptr<OsmWay2FeaturePoint> CreateWay2FeatureMapper(
std::string const & dataFilePath, std::string const & osmIdsToFeatureIdsPath)
std::unique_ptr<OsmWay2FeaturePoint> CreateWay2FeatureMapper(std::string const & dataFilePath,
std::string const & osmIdsToFeatureIdsPath)
{
return std::make_unique<OsmWay2FeaturePointImpl>(dataFilePath, osmIdsToFeatureIdsPath);
}