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


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

Header


Content

Posted by gabrielmorin on July 10, 2010 - 08:06:
Author: gabba
Date: Sat Jul 10 08:06:49 2010
New Revision: 44071

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44071&view=rev
Log:
Whiteboard: renamed a method to something that makes more sense.

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

Modified: trunk/src/whiteboard/action.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/action.hpp?rev=44071&r1=44070&r2=44071&view=diff
==============================================================================
--- trunk/src/whiteboard/action.hpp (original)
+++ trunk/src/whiteboard/action.hpp Sat Jul 10 08:06:49 2010
@@ -58,7 +58,7 @@
        /**
         * Answers whether the specified hex is the main target of action for 
this action.
         */
-       virtual bool is_target_hex(const map_location& hex) const = 0;
+       virtual bool is_numbering_hex(const map_location& hex) const = 0;
 
        /** Return the unit targeted by this action. */
        virtual unit& get_unit() = 0;

Modified: trunk/src/whiteboard/move.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/move.cpp?rev=44071&r1=44070&r2=44071&view=diff
==============================================================================
--- trunk/src/whiteboard/move.cpp (original)
+++ trunk/src/whiteboard/move.cpp Sat Jul 10 08:06:49 2010
@@ -187,10 +187,9 @@
        (void) hex; //temporary to avoid unused param warning
 }
 
-bool move::is_target_hex(const map_location& hex) const
-{
-       bool is_related = hex == dest_hex_;
-       return is_related;
+bool move::is_numbering_hex(const map_location& hex) const
+{
+       return hex == dest_hex_;
 }
 
 bool move::is_related_to(const unit& unit) const

Modified: trunk/src/whiteboard/move.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/move.hpp?rev=44071&r1=44070&r2=44071&view=diff
==============================================================================
--- trunk/src/whiteboard/move.hpp (original)
+++ trunk/src/whiteboard/move.hpp Sat Jul 10 08:06:49 2010
@@ -64,7 +64,7 @@
        /** Gets called by display when drawing a hex, to allow actions to 
draw to the screen. */
        virtual void draw_hex(const map_location& hex);
 
-       virtual bool is_target_hex(const map_location& hex) const;
+       virtual bool is_numbering_hex(const map_location& hex) const;
        virtual bool is_related_to(const unit& unit) const;
 
        virtual void set_valid(bool valid);

Modified: trunk/src/whiteboard/side_actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/side_actions.cpp?rev=44071&r1=44070&r2=44071&view=diff
==============================================================================
--- trunk/src/whiteboard/side_actions.cpp (original)
+++ trunk/src/whiteboard/side_actions.cpp Sat Jul 10 08:06:49 2010
@@ -50,7 +50,7 @@
                //call the action's own draw_hex method
                (*it)->draw_hex(hex);
 
-               if((*it)->is_target_hex(hex))
+               if((*it)->is_numbering_hex(hex))
                {
                        //draw number corresponding to iterator's position + 1
                        size_t number = (it - begin()) + 1;




Related Messages


Powered by MHonArc, Updated Sat Jul 10 08:20:08 2010