mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 03:14:14 +00:00
Pass parameter by const ref instead of const value.
Issue found by cppcheck.
This commit is contained in:
parent
1e902e66d9
commit
b1d593e0d7
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user