From c93a9c48058a5f9b60cfcce71e8b05dc01145c04 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Wed, 17 Apr 2013 16:45:14 +0200 Subject: WINTERMUTE: Avoid passing BasePoint by-value --- engines/wintermute/ad/ad_scene.cpp | 2 +- engines/wintermute/ad/ad_scene.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp index f305c2f60e..221baf4bee 100644 --- a/engines/wintermute/ad/ad_scene.cpp +++ b/engines/wintermute/ad/ad_scene.cpp @@ -420,7 +420,7 @@ bool AdScene::isWalkableAt(int x, int y, bool checkFreeObjects, BaseObject *requ ////////////////////////////////////////////////////////////////////////// -int AdScene::getPointsDist(BasePoint p1, BasePoint p2, BaseObject *requester) { +int AdScene::getPointsDist(const BasePoint &p1, const BasePoint &p2, BaseObject *requester) { double xStep, yStep, x, y; int xLength, yLength, xCount, yCount; int x1, y1, x2, y2; diff --git a/engines/wintermute/ad/ad_scene.h b/engines/wintermute/ad/ad_scene.h index 9cc8135889..ffacc037a9 100644 --- a/engines/wintermute/ad/ad_scene.h +++ b/engines/wintermute/ad/ad_scene.h @@ -153,7 +153,7 @@ public: BaseArray _rotLevels; virtual bool restoreDeviceObjects(); - int getPointsDist(BasePoint p1, BasePoint p2, BaseObject *requester = nullptr); + int getPointsDist(const BasePoint &p1, const BasePoint &p2, BaseObject *requester = nullptr); // scripting interface virtual ScValue *scGetProperty(const Common::String &name); -- cgit v1.2.3