diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-11 20:03:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-11 20:03:02 +0300 |
commit | 91fa2122a536770924bb2819bec4b79e76393d08 (patch) | |
tree | 93c0e191249b2158cf92a564630a4b16e9ccdcaa /src/gui/viewport.cpp | |
parent | 1a524dc9468fe532bc060a73ef736a68687aadca (diff) | |
download | manaverse-91fa2122a536770924bb2819bec4b79e76393d08.tar.gz manaverse-91fa2122a536770924bb2819bec4b79e76393d08.tar.bz2 manaverse-91fa2122a536770924bb2819bec4b79e76393d08.tar.xz manaverse-91fa2122a536770924bb2819bec4b79e76393d08.zip |
Fix code style and small perfomance issues.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |