Author: mordante
Date: Wed Jun 18 20:48:43 2008
New Revision: 27294
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27294&view=rev
Log:
Pass some object parameters as const reference.
Modified:
trunk/src/display.hpp
trunk/src/map.cpp
trunk/src/map.hpp
Modified: trunk/src/display.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.hpp?rev=27294&r1=27293&r2=27294&view=diff
==============================================================================
--- trunk/src/display.hpp (original)
+++ trunk/src/display.hpp Wed Jun 18 20:48:43 2008
@@ -207,7 +207,7 @@
* Per-location invalidation called by invalidate_animations()
* defaults to no action, overriden by derived classes
*/
- virtual void invalidate_animations_location(gamemap::location /*loc*/)
{}
+ virtual void invalidate_animations_location(const gamemap::location&
/*loc*/) {}
const gamemap& get_map()const { return map_;}
Modified: trunk/src/map.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map.cpp?rev=27294&r1=27293&r2=27294&view=diff
==============================================================================
--- trunk/src/map.cpp (original)
+++ trunk/src/map.cpp Wed Jun 18 20:48:43 2008
@@ -90,7 +90,7 @@
}
}
-std::string gamemap::get_terrain_string(t_translation::t_terrain terrain) const
+std::string gamemap::get_terrain_string(const t_translation::t_terrain&
terrain) const
{
std::stringstream ss;
const std::string& name = get_terrain_info(terrain).name();
Modified: trunk/src/map.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map.hpp?rev=27294&r1=27293&r2=27294&view=diff
==============================================================================
--- trunk/src/map.hpp (original)
+++ trunk/src/map.hpp Wed Jun 18 20:48:43 2008
@@ -54,7 +54,7 @@
/**
* Get a formatted terrain name -- terrain (underlying, terrains)
*/
- std::string get_terrain_string(t_translation::t_terrain terrain) const;
+ std::string get_terrain_string(const t_translation::t_terrain& terrain)
const;
//! Throws exception if the map file is not in the correct format.
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits