mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +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:
@@ -48,8 +48,7 @@ public:
|
||||
CompressedBitVector const & rhs);
|
||||
|
||||
// Unites two bit vectors.
|
||||
static std::unique_ptr<CompressedBitVector> Union(CompressedBitVector const & lhs,
|
||||
CompressedBitVector const & rhs);
|
||||
static std::unique_ptr<CompressedBitVector> Union(CompressedBitVector const & lhs, CompressedBitVector const & rhs);
|
||||
|
||||
static bool IsEmpty(std::unique_ptr<CompressedBitVector> const & cbv);
|
||||
|
||||
@@ -156,10 +155,8 @@ public:
|
||||
{
|
||||
base::ControlFlowWrapper<Fn> wrapper(std::forward<Fn>(f));
|
||||
for (auto const & position : m_positions)
|
||||
{
|
||||
if (wrapper(position) == base::ControlFlow::Break)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// CompressedBitVector overrides:
|
||||
@@ -183,8 +180,7 @@ class CompressedBitVectorBuilder
|
||||
public:
|
||||
// Chooses a strategy to store the bit vector with bits from setBits set to one
|
||||
// and returns a pointer to a class that fits best.
|
||||
static std::unique_ptr<CompressedBitVector> FromBitPositions(
|
||||
std::vector<uint64_t> const & setBits);
|
||||
static std::unique_ptr<CompressedBitVector> FromBitPositions(std::vector<uint64_t> const & setBits);
|
||||
static std::unique_ptr<CompressedBitVector> FromBitPositions(std::vector<uint64_t> && setBits);
|
||||
|
||||
// Chooses a strategy to store the bit vector with bits from a bitmap obtained
|
||||
@@ -207,8 +203,7 @@ public:
|
||||
static std::unique_ptr<CompressedBitVector> DeserializeFromSource(TSource & src)
|
||||
{
|
||||
uint8_t header = ReadPrimitiveFromSource<uint8_t>(src);
|
||||
CompressedBitVector::StorageStrategy strat =
|
||||
static_cast<CompressedBitVector::StorageStrategy>(header);
|
||||
CompressedBitVector::StorageStrategy strat = static_cast<CompressedBitVector::StorageStrategy>(header);
|
||||
switch (strat)
|
||||
{
|
||||
case CompressedBitVector::StorageStrategy::Dense:
|
||||
@@ -263,10 +258,7 @@ public:
|
||||
{
|
||||
static constexpr uint64_t kBase = 127;
|
||||
uint64_t hash = 0;
|
||||
CompressedBitVectorEnumerator::ForEach(cbv, [&hash](uint64_t i)
|
||||
{
|
||||
hash = hash * kBase + i + 1;
|
||||
});
|
||||
CompressedBitVectorEnumerator::ForEach(cbv, [&hash](uint64_t i) { hash = hash * kBase + i + 1; });
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user