Author: mordante
Date: Wed Mar  2 22:40:56 2011
New Revision: 48724

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

Modified:
    trunk/src/gui/auxiliary/window_builder/drawing.cpp
    trunk/src/gui/auxiliary/window_builder/drawing.hpp

Modified: trunk/src/gui/auxiliary/window_builder/drawing.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/auxiliary/window_builder/drawing.cpp?rev=48724&r1=48723&r2=48724&view=diff
==============================================================================
--- trunk/src/gui/auxiliary/window_builder/drawing.cpp (original)
+++ trunk/src/gui/auxiliary/window_builder/drawing.cpp Wed Mar  2 22:40:56 2011
@@ -27,11 +27,11 @@
 
 tbuilder_drawing::tbuilder_drawing(const config& cfg)
        : tbuilder_control(cfg)
-       , width_(cfg["width"])
-       , height_(cfg["height"])
-       , draw_(cfg.child("draw"))
+       , width(cfg["width"])
+       , height(cfg["height"])
+       , draw(cfg.child("draw"))
 {
-       assert(!draw_.empty());
+       assert(!draw.empty());
 }
 
 twidget* tbuilder_drawing::build() const
@@ -43,14 +43,14 @@
        const game_logic::map_formula_callable& size =
                        get_screen_size_variables();
 
-       const unsigned width = width_(size);
-       const unsigned height = height_(size);
+       const unsigned w = width(size);
+       const unsigned h = height(size);
 
-       if(width || height) {
-               widget->set_best_size(tpoint(width, height));
+       if(w || h) {
+               widget->set_best_size(tpoint(w, h));
        }
 
-       widget->canvas().front().set_cfg(draw_);
+       widget->canvas().front().set_cfg(draw);
 
        DBG_GUI_G << "Window builder: placed drawing '"
                        << id << "' with definition '"

Modified: trunk/src/gui/auxiliary/window_builder/drawing.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/auxiliary/window_builder/drawing.hpp?rev=48724&r1=48723&r2=48724&view=diff
==============================================================================
--- trunk/src/gui/auxiliary/window_builder/drawing.hpp (original)
+++ trunk/src/gui/auxiliary/window_builder/drawing.hpp Wed Mar  2 22:40:56 2011
@@ -30,15 +30,14 @@
 
        twidget* build () const;
 
-private:
        /** The width of the widget. */
-       tformula<unsigned> width_;
+       tformula<unsigned> width;
 
        /** The height of the widget. */
-       tformula<unsigned> height_;
+       tformula<unsigned> height;
 
        /** Config containing what to draw on the widgets canvas. */
-       config draw_;
+       config draw;
 };
 
 } // namespace implementation


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

Reply via email to