From 91fa2122a536770924bb2819bec4b79e76393d08 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Sep 2012 20:03:02 +0300 Subject: Fix code style and small perfomance issues. --- src/gui/viewport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/viewport.cpp') diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index b9abb4952..f30ebaecd 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -897,8 +897,8 @@ void Viewport::moveCameraToActor(const int actorId, const int x, const int y) const Actor *const actor = actorSpriteManager->findBeing(actorId); if (!actor) return; - const Vector actorPos = actor->getPosition(); - const Vector playerPos = player_node->getPosition(); + const Vector &actorPos = actor->getPosition(); + const Vector &playerPos = player_node->getPosition(); mCameraMode = 1; mCameraRelativeX = actorPos.x - playerPos.x + x; mCameraRelativeY = actorPos.y - playerPos.y + y; @@ -909,7 +909,7 @@ void Viewport::moveCameraToPosition(const int x, const int y) if (!player_node) return; - const Vector playerPos = player_node->getPosition(); + const Vector &playerPos = player_node->getPosition(); mCameraMode = 1; mCameraRelativeX = x - playerPos.x; -- cgit v1.2.3-70-g09d2