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

@@ -27,7 +27,7 @@ class ClusteringMapAdapter
public:
struct Cluster
{
Cluster(Key const & key, Value const & value): m_keys({key}), m_values({value}) {}
Cluster(Key const & key, Value const & value) : m_keys({key}), m_values({value}) {}
Cluster(vector<Key> const & keys, vector<Value> const & values) : m_keys(keys), m_values(values)
{
@@ -42,10 +42,7 @@ public:
return m_values < rhs.m_values;
}
bool operator==(Cluster const & rhs) const
{
return m_keys == rhs.m_keys && m_values == rhs.m_values;
}
bool operator==(Cluster const & rhs) const { return m_keys == rhs.m_keys && m_values == rhs.m_values; }
friend string DebugPrint(Cluster const & cluster)
{
@@ -75,9 +72,8 @@ public:
{
vector<Cluster> clusters;
m_m.ForEachCluster([&](vector<Key> const & keys, vector<Value> const & values) {
clusters.emplace_back(keys, values);
});
m_m.ForEachCluster([&](vector<Key> const & keys, vector<Value> const & values)
{ clusters.emplace_back(keys, values); });
sort(clusters.begin(), clusters.end());
return clusters;
}
@@ -151,16 +147,15 @@ UNIT_TEST(ClusteringMap_ForEach)
m.Append(4, "gamma");
{
vector<Cluster> const expected = {{Cluster{0, "Hello"}, Cluster{1, "World!"},
Cluster{2, "alpha"}, Cluster{3, "beta"},
Cluster{4, "gamma"}}};
vector<Cluster> const expected = {
{Cluster{0, "Hello"}, Cluster{1, "World!"}, Cluster{2, "alpha"}, Cluster{3, "beta"}, Cluster{4, "gamma"}}};
TEST_EQUAL(expected, m.Clusters(), ());
}
m.Union(0, 1);
{
vector<Cluster> const expected = {{Cluster{{0, 1}, {"Hello", "World!"}}, Cluster{2, "alpha"},
Cluster{3, "beta"}, Cluster{4, "gamma"}}};
vector<Cluster> const expected = {
{Cluster{{0, 1}, {"Hello", "World!"}}, Cluster{2, "alpha"}, Cluster{3, "beta"}, Cluster{4, "gamma"}}};
TEST_EQUAL(expected, m.Clusters(), ());
}
@@ -174,8 +169,7 @@ UNIT_TEST(ClusteringMap_ForEach)
m.Union(0, 3);
{
vector<Cluster> const expected = {
{Cluster{{0, 1, 2, 3, 4}, {"Hello", "World!", "alpha", "beta", "gamma"}}}};
vector<Cluster> const expected = {{Cluster{{0, 1, 2, 3, 4}, {"Hello", "World!", "alpha", "beta", "gamma"}}}};
TEST_EQUAL(expected, m.Clusters(), ());
}
}