add explicit std::move calls to avoid copies
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user