Skip to content

Commit

Permalink
Address bug pointed out by SonarCloud
Browse files Browse the repository at this point in the history
I am not convinced though that it was a bug.
  • Loading branch information
Hannah Bast committed Apr 8, 2023
1 parent b10ec84 commit 3afe571
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index/CompressedRelation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,13 @@ void CompressedRelationReader::scan(
ad_utility::AllocatorWithLimit<Id> allocator{
ad_utility::makeAllocationMemoryLeftThreadsafeObject(
std::numeric_limits<size_t>::max())};
IdTable result(1, allocator);
result.resize(block.size());
std::unique_ptr<IdTable> result = std::make_unique<IdTable>(1, allocator);
result->resize(block.size());
for (size_t i = 0; i < block.size(); ++i) {
result(i, 0) = block(i, 1);
(*result)(i, 0) = block(i, 1);
}
return {std::make_unique<IdTable>(std::move(result)), rowIndexBegin,
rowIndexEnd, blockIndex, numInsAndDel};
return {std::move(result), rowIndexBegin, rowIndexEnd, blockIndex,
numInsAndDel};
};

// The first and the last block might be incomplete. We process them
Expand Down

0 comments on commit 3afe571

Please sign in to comment.