Pass parameter by const ref instead of const value.

Issue found by cppcheck.
This commit is contained in:
Mark de Wever 2012-07-29 19:08:56 +00:00
parent 1e902e66d9
commit b1d593e0d7
2 changed files with 2 additions and 2 deletions

View File

@ -386,7 +386,7 @@ theme::object::ANCHORING theme::object::read_anchor(const std::string& str)
return FIXED;
}
void theme::object::modify_location(const _rect rect){
void theme::object::modify_location(const _rect& rect){
loc_.x = rect.x1;
loc_.y = rect.y1;
loc_.w = rect.x2 - rect.x1;

View File

@ -43,7 +43,7 @@ class theme
// This supports relocating of theme elements ingame.
// It is needed for [change] tags in theme WML.
void modify_location(const _rect rect);
void modify_location(const _rect& rect);
void modify_location(std::string rect_str, SDL_Rect rect_ref);
// All on-screen objects have 'anchoring' in the x and y dimensions.