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

@@ -11,7 +11,10 @@
#include <string>
#include <vector>
namespace feature { class FeatureBuilder; }
namespace feature
{
class FeatureBuilder;
}
namespace routing
{
@@ -25,32 +28,29 @@ using FeatureIdToOsmId = std::map<uint32_t, base::GeoObjectId>;
// when an area and its boundary may correspond to the same osm id.
/// @note As for road features a road |osmId| may correspond to several feature ids if
/// the |osmId| is split by a mini_roundabout or a turning_loop.
void AddFeatureId(base::GeoObjectId osmId, uint32_t featureId,
OsmIdToFeatureIds & osmIdToFeatureIds);
void AddFeatureId(base::GeoObjectId osmId, uint32_t featureId, OsmIdToFeatureIds & osmIdToFeatureIds);
// These methods fill |osmIdToFeatureIds| and |featureIdToOsmId| with features of
// type base::GeoObjectId::Type::ObsoleteOsmWay. This type contains all the roads
// and besides that other linear objects like streams and fences.
/// @note One osm id can be mapped on several feature ids, as described above in AddFeatureId.
void ParseWaysOsmIdToFeatureIdMapping(std::string const & osmIdsToFeatureIdPath,
OsmIdToFeatureIds & osmIdToFeatureIds);
void ParseWaysFeatureIdToOsmIdMapping(std::string const & osmIdsToFeatureIdPath,
FeatureIdToOsmId & featureIdToOsmId);
void ParseWaysOsmIdToFeatureIdMapping(std::string const & osmIdsToFeatureIdPath, OsmIdToFeatureIds & osmIdToFeatureIds);
void ParseWaysFeatureIdToOsmIdMapping(std::string const & osmIdsToFeatureIdPath, FeatureIdToOsmId & featureIdToOsmId);
class OsmWay2FeaturePoint
{
public:
virtual ~OsmWay2FeaturePoint() = default;
virtual void ForEachFeature(uint64_t wayID, std::function<void (uint32_t)> const & fn) = 0;
virtual void ForEachFeature(uint64_t wayID, std::function<void(uint32_t)> const & fn) = 0;
/// Pass (featureID, nodeIdx) for the correspondent point |pt| in OSM |wayID|.
/// @param[in] candidateIdx Used as a hint (like it was in original OSM way).
virtual void ForEachNodeIdx(uint64_t wayID, uint32_t candidateIdx, m2::PointU pt,
std::function<void (uint32_t, uint32_t)> const & fn) = 0;
std::function<void(uint32_t, uint32_t)> const & fn) = 0;
};
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);
bool IsRoadWay(feature::FeatureBuilder const & fb);
} // namespace routing