add explicit std::move calls to avoid copies

This commit is contained in:
Arne Morten Kvarving
2021-09-10 11:03:50 +02:00
parent 1459d5fd96
commit 9dd8bbc23c
2 changed files with 3 additions and 3 deletions

View File

@@ -84,7 +84,7 @@ std::vector<double> FunctionSum::getValue (const Vec3& X) const
if (val[j] > sum[j]) sum[j] = val[j];
}
return sum;
return std::move(sum);
}

View File

@@ -314,7 +314,7 @@ RealArray FieldsFuncBase::getValues (const Vec3& X)
else
{
int level = this->findClosestLevel(x4->t);
if (level < 0) return vals;
if (level < 0) return std::move(vals);
if (level != currentLevel)
if (this->load(fName,bName,level))
currentLevel = level;
@@ -325,7 +325,7 @@ RealArray FieldsFuncBase::getValues (const Vec3& X)
field[pidx]->valueCoor(*x4,vals);
}
return vals;
return std::move(vals);
}