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

@@ -9,86 +9,82 @@
namespace stats
{
struct GeneralInfo
{
GeneralInfo() : m_count(0), m_size(0), m_names(0), m_length(0), m_area(0) {}
struct GeneralInfo
{
GeneralInfo() : m_count(0), m_size(0), m_names(0), m_length(0), m_area(0) {}
void Add(uint64_t szBytes, double len = 0, double area = 0, bool hasName = false)
void Add(uint64_t szBytes, double len = 0, double area = 0, bool hasName = false)
{
if (szBytes > 0)
{
if (szBytes > 0)
{
++m_count;
m_size += szBytes;
m_length += len;
m_area += area;
if (hasName)
++m_names;
}
++m_count;
m_size += szBytes;
m_length += len;
m_area += area;
if (hasName)
++m_names;
}
}
uint64_t m_count;
uint64_t m_size;
uint64_t m_names;
double m_length;
double m_area;
};
uint64_t m_count;
uint64_t m_size;
uint64_t m_names;
double m_length;
double m_area;
};
struct GeomInfo
struct GeomInfo
{
void Add(uint64_t szBytes, uint32_t elements)
{
void Add(uint64_t szBytes, uint32_t elements)
if (szBytes > 0)
{
if (szBytes > 0)
{
++m_count;
m_size += szBytes;
m_elements += elements;
}
++m_count;
m_size += szBytes;
m_elements += elements;
}
}
uint64_t m_count = 0, m_size = 0, m_elements = 0;
};
uint64_t m_count = 0, m_size = 0, m_elements = 0;
};
using GeomStats = GeomInfo[feature::DataHeader::kMaxScalesCount];
using GeomStats = GeomInfo[feature::DataHeader::kMaxScalesCount];
template <class T, int Tag>
struct IntegralType
{
T m_val;
explicit IntegralType(T v) : m_val(v) {}
bool operator<(IntegralType const & rhs) const { return m_val < rhs.m_val; }
};
template <class T, int Tag>
struct IntegralType
{
T m_val;
explicit IntegralType(T v) : m_val(v) {}
bool operator<(IntegralType const & rhs) const { return m_val < rhs.m_val; }
};
using ClassifType = IntegralType<uint32_t, 0>;
using CountType = IntegralType<uint32_t, 1>;
using AreaType = IntegralType<size_t, 2>;
using ClassifType = IntegralType<uint32_t, 0>;
using CountType = IntegralType<uint32_t, 1>;
using AreaType = IntegralType<size_t, 2>;
struct MapInfo
{
explicit MapInfo(int geomMinDiff, double geomMinFactor)
: m_geomMinDiff(geomMinDiff)
, m_geomMinFactor(geomMinFactor)
{}
struct MapInfo
{
explicit MapInfo(int geomMinDiff, double geomMinFactor) : m_geomMinDiff(geomMinDiff), m_geomMinFactor(geomMinFactor)
{}
size_t m_geomMinDiff;
double m_geomMinFactor;
size_t m_geomMinDiff;
double m_geomMinFactor;
std::map<feature::GeomType, GeneralInfo> m_byGeomType;
std::map<ClassifType, GeneralInfo> m_byClassifType;
std::map<CountType, GeneralInfo> m_byPointsCount, m_byTrgCount;
std::map<AreaType, GeneralInfo> m_byAreaSize;
std::map<feature::GeomType, GeneralInfo> m_byGeomType;
std::map<ClassifType, GeneralInfo> m_byClassifType;
std::map<CountType, GeneralInfo> m_byPointsCount, m_byTrgCount;
std::map<AreaType, GeneralInfo> m_byAreaSize;
GeomStats m_byLineGeom, m_byAreaGeom,
m_byLineGeomComparedS, m_byLineGeomComparedD,
m_byAreaGeomComparedS, m_byAreaGeomComparedD,
m_byLineGeomDup, m_byAreaGeomDup;
GeomStats m_byLineGeom, m_byAreaGeom, m_byLineGeomComparedS, m_byLineGeomComparedD, m_byAreaGeomComparedS,
m_byAreaGeomComparedD, m_byLineGeomDup, m_byAreaGeomDup;
GeneralInfo m_innerPoints, m_innerFirstPoints, m_innerStrips, m_innerSize;
};
GeneralInfo m_innerPoints, m_innerFirstPoints, m_innerStrips, m_innerSize;
};
void PrintFileContainerStats(std::ostream & os, std::string const & fPath);
void PrintFileContainerStats(std::ostream & os, std::string const & fPath);
void CalcStats(std::string const & fPath, MapInfo & info);
void PrintStats(std::ostream & os, MapInfo & info);
void PrintTypeStats(std::ostream & os, MapInfo & info);
void PrintOuterGeometryStats(std::ostream & os, MapInfo & info);
}
void CalcStats(std::string const & fPath, MapInfo & info);
void PrintStats(std::ostream & os, MapInfo & info);
void PrintTypeStats(std::ostream & os, MapInfo & info);
void PrintOuterGeometryStats(std::ostream & os, MapInfo & info);
} // namespace stats