Author: alink
Date: Mon May 18 00:58:46 2009
New Revision: 35723

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35723&view=rev
Log:
Use reference for image::locator (not so small structure)

Modified:
    trunk/src/display.cpp
    trunk/src/game_display.cpp
    trunk/src/unit_frame.cpp
    trunk/src/unit_frame.hpp

Modified: trunk/src/display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=35723&r1=35722&r2=35723&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Mon May 18 00:58:46 2009
@@ -686,7 +686,7 @@
                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,

Modified: trunk/src/game_display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=35723&r1=35722&r2=35723&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Mon May 18 00:58:46 2009
@@ -724,7 +724,7 @@
                  (!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);
                }

Modified: trunk/src/unit_frame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.cpp?rev=35723&r1=35722&r2=35723&view=diff
==============================================================================
--- trunk/src/unit_frame.cpp (original)
+++ trunk/src/unit_frame.cpp Mon May 18 00:58:46 2009
@@ -276,13 +276,13 @@
        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;

Modified: trunk/src/unit_frame.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.hpp?rev=35723&r1=35722&r2=35723&view=diff
==============================================================================
--- trunk/src/unit_frame.hpp (original)
+++ trunk/src/unit_frame.hpp Mon May 18 00:58:46 2009
@@ -99,8 +99,8 @@
                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);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to