Use reference for image::locator (not so small structure)
This commit is contained in:
parent
46c8ea9dba
commit
6be85c276f
4 changed files with 6 additions and 6 deletions
|
@ -686,7 +686,7 @@ std::vector<surface> display::get_terrain_images(const map_location &loc,
|
|||
for(std::vector<animated<image::locator> >::const_iterator it =
|
||||
terrains->begin(); it != terrains->end(); ++it) {
|
||||
|
||||
image::locator image = preferences::animate_map() ?
|
||||
const image::locator& image = preferences::animate_map() ?
|
||||
it->get_current_frame() : it->get_first_frame();
|
||||
|
||||
// We prevent ToD colouring and brightening of off-map tiles,
|
||||
|
|
|
@ -724,7 +724,7 @@ surface game_display::get_flag(const map_location& loc)
|
|||
(!fogged(loc) || !teams_[currentTeam_].is_enemy(i+1)))
|
||||
{
|
||||
flags_[i].update_last_draw_time();
|
||||
image::locator image_flag = preferences::animate_map() ?
|
||||
const image::locator& image_flag = preferences::animate_map() ?
|
||||
flags_[i].get_current_frame() : flags_[i].get_first_frame();
|
||||
return image::get_image(image_flag, image::SCALED_TO_HEX);
|
||||
}
|
||||
|
|
|
@ -276,13 +276,13 @@ const frame_parameters frame_builder::parameters(int current_time) const
|
|||
result.drawing_layer = drawing_layer_.get_current_element(current_time,display::LAYER_UNIT_DEFAULT-display::LAYER_UNIT_FIRST);
|
||||
return result;
|
||||
}
|
||||
frame_builder & frame_builder::image(const image::locator image ,const std::string & image_mod)
|
||||
frame_builder & frame_builder::image(const image::locator& image ,const std::string & image_mod)
|
||||
{
|
||||
image_ = image;
|
||||
image_mod_ = image_mod;
|
||||
return *this;
|
||||
}
|
||||
frame_builder & frame_builder::image_diagonal(const image::locator image_diagonal,const std::string& image_mod)
|
||||
frame_builder & frame_builder::image_diagonal(const image::locator& image_diagonal,const std::string& image_mod)
|
||||
{
|
||||
image_diagonal_ = image_diagonal;
|
||||
image_mod_ = image_mod;
|
||||
|
|
|
@ -99,8 +99,8 @@ class frame_builder {
|
|||
frame_builder();
|
||||
frame_builder(const config& cfg,const std::string &frame_string = "");
|
||||
/** allow easy chained modifications will raised assert if used after initialization */
|
||||
frame_builder & image(const image::locator image ,const std::string & image_mod="");
|
||||
frame_builder & image_diagonal(const image::locator image_diagonal,const std::string & image_mod="");
|
||||
frame_builder & image(const image::locator& image ,const std::string & image_mod="");
|
||||
frame_builder & image_diagonal(const image::locator& image_diagonal,const std::string & image_mod="");
|
||||
frame_builder & sound(const std::string& sound);
|
||||
frame_builder & text(const std::string& text,const Uint32 text_color);
|
||||
frame_builder & halo(const std::string &halo, const std::string &halo_x, const std::string& halo_y,const std::string& halo_mod);
|
||||
|
|
Loading…
Add table
Reference in a new issue