Author: fendrin
Date: Fri Jan 15 02:47:39 2010
New Revision: 40701

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40701&view=rev
Log:
Return a reference instead of a copy to the tunnels.

Modified:
    branches/fendrin_pathfind/src/map.hpp

Modified: branches/fendrin_pathfind/src/map.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_pathfind/src/map.hpp?rev=40701&r1=40700&r2=40701&view=diff
==============================================================================
--- branches/fendrin_pathfind/src/map.hpp (original)
+++ branches/fendrin_pathfind/src/map.hpp Fri Jan 15 02:47:39 2010
@@ -190,9 +190,10 @@
 
        //TODO
        /** Return a vector of the locations of tunnels on the game_map. */
-       std::vector<teleport_group> tunnels() { return tunnels_; }
-
-       /** Defines a oneway tunnel between the source and the destination 
location.
+       std::vector<teleport_group>& tunnels() { return tunnels_; }
+
+       /**
+        * Defines a oneway tunnel between the source and the destination 
location.
         *  Units can travel through this tunnel like the hexes would be 
adjacent.
         */
        void set_tunnel(const teleport_group group) { 
tunnels_.push_back(group); }


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

Reply via email to