Author: mordante
Date: Wed Mar  2 22:40:34 2011
New Revision: 48717

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48717&view=rev
Log:
Polishing the code a bit.

Modified:
    trunk/src/gui/widgets/widget.cpp
    trunk/src/gui/widgets/widget.hpp

Modified: trunk/src/gui/widgets/widget.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.cpp?rev=48717&r1=48716&r2=48717&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.cpp (original)
+++ trunk/src/gui/widgets/widget.cpp Wed Mar  2 22:40:34 2011
@@ -23,7 +23,7 @@
 twidget::twidget()
        : id_("")
        , definition_("default")
-       , parent_(0)
+       , parent_(NULL)
        , x_(-1)
        , y_(-1)
        , w_(0)
@@ -139,13 +139,13 @@
 twidget* twidget::find_at(const tpoint& coordinate,
                const bool must_be_active)
 {
-       return is_at(coordinate, must_be_active) ? this : 0;
+       return is_at(coordinate, must_be_active) ? this : NULL;
 }
 
 const twidget* twidget::find_at(const tpoint& coordinate,
                const bool must_be_active) const
 {
-       return is_at(coordinate, must_be_active) ? this : 0;
+       return is_at(coordinate, must_be_active) ? this : NULL;
 }
 
 SDL_Rect twidget::get_dirty_rect() const
@@ -186,7 +186,7 @@
 tdialog* twidget::dialog()
 {
        twindow* window = get_window();
-       return window ? window->dialog() : 0;
+       return window ? window->dialog() : NULL;
 }
 
 void twidget::populate_dirty_list(twindow& caller,

Modified: trunk/src/gui/widgets/widget.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.hpp?rev=48717&r1=48716&r2=48717&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.hpp (original)
+++ trunk/src/gui/widgets/widget.hpp Wed Mar  2 22:40:34 2011
@@ -541,24 +541,27 @@
 private:
 
        /**
-        * The id is the unique name of the widget in a certain context. This is
-        * needed for certain widgets so the engine knows which widget is which.
-        * Eg it knows which button is pressed and thus which engine action is
-        * connected to the button. This doesn't mean that the id is unique in a
+        * The id is the unique name of the widget in a certain context.
+        *
+        * This is needed for certain widgets so the engine knows which widget 
is
+        * which. Eg it knows which button is pressed and thus which engine 
action
+        * is connected to the button. This doesn't mean that the id is unique 
in a
         * window, eg a listbox can have the same id for every row.
         */
        std::string id_;
 
        /**
-        * The definition is the id of that widget class. Eg for a button it
-        * [button_definition]id. A button can have multiple definitions which 
all
-        * look different but for the engine still is a button.
+        * The definition is the id of that widget class.
+        *
+        * Eg for a button it [button_definition]id. A button can have multiple
+        * definitions which all look different but for the engine still is a
+        * button.
         */
        std::string definition_;
 
        /**
         * The parent widget, if the widget has a parent it contains a pointer 
to
-        * the parent, else it's set to 0.
+        * the parent, else it's set to NULL.
         */
        twidget* parent_;
 


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

Reply via email to