mail[Wesnoth-commits] r44269 - in /trunk/src/whiteboard: action.hpp move.cpp move.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by gabrielmorin on July 18, 2010 - 07:26:
Author: gabba
Date: Sun Jul 18 07:26:14 2010
New Revision: 44269

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44269&view=rev
Log:
Whiteboard: removed invalid function overloading.

Modified:
    trunk/src/whiteboard/action.hpp
    trunk/src/whiteboard/move.cpp
    trunk/src/whiteboard/move.hpp

Modified: trunk/src/whiteboard/action.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/action.hpp?rev=44269&r1=44268&r2=44269&view=diff
==============================================================================
--- trunk/src/whiteboard/action.hpp (original)
+++ trunk/src/whiteboard/action.hpp Sun Jul 18 07:26:14 2010
@@ -56,8 +56,7 @@
        virtual bool is_numbering_hex(const map_location& hex) const = 0;
 
        /** Return the unit targeted by this action. Null if unit doesn't 
exist. */
-       virtual unit* get_unit() = 0;
-       virtual unit const* get_unit() const = 0;
+       virtual unit* get_unit() const = 0;
 
        /**
         * Indicates to an action whether its status is invalid, and whether 
it should change its

Modified: trunk/src/whiteboard/move.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/move.cpp?rev=44269&r1=44268&r2=44269&view=diff
==============================================================================
--- trunk/src/whiteboard/move.cpp (original)
+++ trunk/src/whiteboard/move.cpp Sun Jul 18 07:26:14 2010
@@ -161,17 +161,13 @@
        return move_finished_completely;
 }
 
-unit* move::get_unit()
+unit* move::get_unit() const
 {
        unit_map::iterator it = resources::units->find(source_hex_);
        if (it != resources::units->end())
                return &*it;
        else
                return NULL;
-}
-unit const* move::get_unit() const
-{
-       return get_unit();
 }
 
 void move::apply_temp_modifier(unit_map& unit_map)

Modified: trunk/src/whiteboard/move.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/move.hpp?rev=44269&r1=44268&r2=44269&view=diff
==============================================================================
--- trunk/src/whiteboard/move.hpp (original)
+++ trunk/src/whiteboard/move.hpp Sun Jul 18 07:26:14 2010
@@ -54,9 +54,7 @@
        virtual bool execute();
 
        /** Return the unit targeted by this action. Null if unit doesn't 
exist. */
-       virtual unit* get_unit();
-       virtual unit const* get_unit() const;
-
+       virtual unit* get_unit() const;
 
        virtual arrow_ptr get_arrow() { return arrow_; }
        virtual fake_unit_ptr get_fake_unit() { return fake_unit_; }




Related Messages


Powered by MHonArc, Updated Sun Jul 18 07:40:11 2010