Skip to content

Commit 3afe571

Browse files
author
Hannah Bast
committed
Address bug pointed out by SonarCloud
I am not convinced though that it was a bug.
1 parent b10ec84 commit 3afe571

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index/CompressedRelation.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@ void CompressedRelationReader::scan(
367367
ad_utility::AllocatorWithLimit<Id> allocator{
368368
ad_utility::makeAllocationMemoryLeftThreadsafeObject(
369369
std::numeric_limits<size_t>::max())};
370-
IdTable result(1, allocator);
371-
result.resize(block.size());
370+
std::unique_ptr<IdTable> result = std::make_unique<IdTable>(1, allocator);
371+
result->resize(block.size());
372372
for (size_t i = 0; i < block.size(); ++i) {
373-
result(i, 0) = block(i, 1);
373+
(*result)(i, 0) = block(i, 1);
374374
}
375-
return {std::make_unique<IdTable>(std::move(result)), rowIndexBegin,
376-
rowIndexEnd, blockIndex, numInsAndDel};
375+
return {std::move(result), rowIndexBegin, rowIndexEnd, blockIndex,
376+
numInsAndDel};
377377
};
378378

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

0 commit comments

Comments
 (0)