Skip to content

Commit

Permalink
nfc avoid a copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Hamel committed Oct 14, 2020
1 parent 9e1620e commit 6f94434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/souffle/RecordTable.h
Expand Up @@ -59,7 +59,7 @@ class RecordMap {

/** @brief converts record to a record reference */
// TODO (b-scholz): replace vector<RamDomain> with something more memory-frugal
RamDomain pack(const std::vector<RamDomain>& vector) {
RamDomain pack(std::vector<RamDomain> vector) {
RamDomain index;
#pragma omp critical(record_pack)
{
Expand All @@ -69,7 +69,7 @@ class RecordMap {
} else {
#pragma omp critical(record_unpack)
{
indexToRecord.push_back(vector);
indexToRecord.push_back(std::move(vector));
index = static_cast<RamDomain>(indexToRecord.size()) - 1;
recordToIndex[vector] = index;

Expand Down

0 comments on commit 6f94434

Please sign in to comment.