TWP: Fix unnecessary object copies can affect performance.

Coverity CID 1540872
This commit is contained in:
scemino 2024-04-06 14:42:09 +02:00
parent 883be6289d
commit 8d8452cfcf

View File

@ -540,7 +540,7 @@ bool Walkbox::contains(const Math::Vector2d &position, bool toleranceOnOutside)
if ((left.getX() < point.getX()) && (point.getX() <= right.getX()) && ((point.getY() - left.getY()) * (right.getX() - left.getX())) < ((right.getY() - left.getY()) * (point.getX() - left.getX())))
result = !result;
oldPoint = newPoint;
oldPoint = Common::move(newPoint);
oldSqDist = newSqDist;
}
return result;