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

@@ -7,8 +7,8 @@
#include "indexer/scales.hpp"
#include <vector>
#include <unordered_map>
#include <vector>
namespace topography_generator
{
@@ -27,12 +27,12 @@ struct Contours
ValueType m_minValue = 0;
ValueType m_maxValue = 0;
ValueType m_valueStep = 0;
size_t m_invalidValuesCount = 0; // for debug purpose only.
size_t m_invalidValuesCount = 0; // for debug purpose only.
};
template <typename ValueType>
void CropContours(m2::RectD & rect, std::vector<m2::RegionD> & regions, size_t maxLength,
size_t valueStepFactor, Contours<ValueType> & contours)
void CropContours(m2::RectD & rect, std::vector<m2::RegionD> & regions, size_t maxLength, size_t valueStepFactor,
Contours<ValueType> & contours)
{
static_assert(std::is_integral<ValueType>::value, "Only integral types are supported.");
@@ -90,8 +90,7 @@ void SimplifyContours(int simplificationZoom, Contours<ValueType> & contours)
for (auto & contour : levelContours.second)
{
std::vector<m2::PointD> contourSimple;
feature::SimplifyPoints(m2::SquaredDistanceFromSegmentToPoint(),
simplificationZoom, contour, contourSimple);
feature::SimplifyPoints(m2::SquaredDistanceFromSegmentToPoint(), simplificationZoom, contour, contourSimple);
CHECK_GREATER(contourSimple.size(), 1, ());
// Discard closed lines which are degenerate (<=3 points) or too small for the requested zoom level.
/// @todo it doesn't fix all cases as the simplification algo

View File

@@ -2,8 +2,8 @@
#include "topography_generator/utils/contours.hpp"
#include "coding/file_writer.hpp"
#include "coding/file_reader.hpp"
#include "coding/file_writer.hpp"
#include "coding/geometry_coding.hpp"
#include "coding/internal/file_data.hpp"
@@ -13,7 +13,7 @@ template <typename ValueType>
class SerializerContours
{
public:
explicit SerializerContours(Contours<ValueType> && contours): m_contours(std::move(contours)) {}
explicit SerializerContours(Contours<ValueType> && contours) : m_contours(std::move(contours)) {}
template <typename Sink>
void Serialize(Sink & sink)
@@ -31,8 +31,7 @@ public:
private:
template <typename Sink>
void SerializeContours(Sink & sink, ValueType value,
std::vector<topography_generator::Contour> const & contours)
void SerializeContours(Sink & sink, ValueType value, std::vector<topography_generator::Contour> const & contours)
{
WriteToSink(sink, value);
WriteToSink(sink, static_cast<uint32_t>(contours.size()));
@@ -81,7 +80,7 @@ public:
private:
void DeserializeContours(NonOwningReaderSource & source, ValueType & value,
std::vector<topography_generator::Contour> & contours)
std::vector<topography_generator::Contour> & contours)
{
value = ReadPrimitiveFromSource<ValueType>(source);
size_t const contoursCount = ReadPrimitiveFromSource<uint32_t>(source);
@@ -90,8 +89,7 @@ private:
DeserializeContour(source, contour);
}
void DeserializeContour(NonOwningReaderSource & source,
topography_generator::Contour & contour)
void DeserializeContour(NonOwningReaderSource & source, topography_generator::Contour & contour)
{
serial::GeometryCodingParams codingParams;
codingParams.Load(source);
@@ -102,8 +100,7 @@ private:
};
template <typename ValueType>
bool SaveContrours(std::string const & filePath,
Contours<ValueType> && contours)
bool SaveContrours(std::string const & filePath, Contours<ValueType> && contours)
{
auto const tmpFilePath = filePath + ".tmp";
try