mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
/// Index bucket <--> Draw scale range.
|
||||
/// Using default one-to-one mapping.
|
||||
class ScaleIndexBase
|
||||
@@ -18,10 +17,7 @@ public:
|
||||
static uint32_t GetBucketsCount() { return 18; }
|
||||
static uint32_t BucketByScale(int scale) { return static_cast<uint32_t>(scale); }
|
||||
/// @return Range like [x, y).
|
||||
static std::pair<uint32_t, uint32_t> ScaleRangeForBucket(uint32_t bucket)
|
||||
{
|
||||
return {bucket, bucket + 1};
|
||||
}
|
||||
static std::pair<uint32_t, uint32_t> ScaleRangeForBucket(uint32_t bucket) { return {bucket, bucket + 1}; }
|
||||
};
|
||||
|
||||
template <class Reader>
|
||||
@@ -32,15 +28,9 @@ public:
|
||||
|
||||
ScaleIndex(Reader const & reader, IndexFactory const & factory) { Attach(reader, factory); }
|
||||
|
||||
~ScaleIndex()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
~ScaleIndex() { Clear(); }
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_IndexForScale.clear();
|
||||
}
|
||||
void Clear() { m_IndexForScale.clear(); }
|
||||
|
||||
void Attach(Reader const & reader, IndexFactory const & factory)
|
||||
{
|
||||
@@ -57,10 +47,8 @@ public:
|
||||
{
|
||||
auto const scaleBucket = BucketByScale(scale);
|
||||
if (scaleBucket < m_IndexForScale.size())
|
||||
{
|
||||
for (size_t i = 0; i <= scaleBucket; ++i)
|
||||
m_IndexForScale[i]->ForEach(fn, beg, end);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user