mail[Wesnoth-commits] r28495 - /trunk/src/dialogs.cpp


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

Header


Content

Posted by koraq on August 12, 2008 - 20:58:
Author: mordante
Date: Tue Aug 12 20:06:42 2008
New Revision: 28495

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28495&view=rev
Log:
Initialize all members.

Modified:
    trunk/src/dialogs.cpp

Modified: trunk/src/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=28495&r1=28494&r2=28495&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Tue Aug 12 20:06:42 2008
@@ -372,8 +372,16 @@
 {
 public:
        save_preview_pane(CVideo &video, const config& game_config, gamemap* 
map,
-                         const std::vector<save_info>& info, const 
std::vector<config*>& summaries, const gui::filter_textbox& textbox)
-               : gui::preview_pane(video), game_config_(&game_config), 
map_(map), info_(&info), summaries_(&summaries), index_(0), textbox_(textbox)
+                       const std::vector<save_info>& info, 
+                       const std::vector<config*>& summaries, 
+                       const gui::filter_textbox& textbox) :
+               gui::preview_pane(video), 
+               game_config_(&game_config), 
+               map_(map), info_(&info), 
+               summaries_(&summaries), 
+               index_(0), 
+               map_cache_(),
+               textbox_(textbox)
        {
                set_measurements(minimum<int>(200,video.getx()/4),
                                 minimum<int>(400,video.gety() * 4/5));
@@ -897,19 +905,22 @@
        }
 }
 
-units_list_preview_pane::units_list_preview_pane(game_display& disp, const 
gamemap* map,
-               const unit& u, TYPE type, bool on_left_side)
-                                       : unit_preview_pane(disp, map, NULL, 
type, on_left_side),
-                                         units_(&unit_store_)
-{
-       unit_store_.push_back(u);
-}
-
-units_list_preview_pane::units_list_preview_pane(game_display& disp, const 
gamemap* map,
-               std::vector<unit>& units, const gui::filter_textbox* filter, 
TYPE type, bool on_left_side)
-                                       : unit_preview_pane(disp, map, 
filter, type, on_left_side),
-                                         units_(&units)
-{}
+units_list_preview_pane::units_list_preview_pane(game_display& disp, 
+               const gamemap* map, const unit& u, TYPE type, bool 
on_left_side) :
+       unit_preview_pane(disp, map, NULL, type, on_left_side), 
+       units_(&unit_store_),
+       unit_store_(1, u)
+{
+}
+
+units_list_preview_pane::units_list_preview_pane(game_display& disp, 
+               const gamemap* map, std::vector<unit>& units, 
+               const gui::filter_textbox* filter, TYPE type, bool 
on_left_side) :
+       unit_preview_pane(disp, map, filter, type, on_left_side),
+       units_(&units),
+       unit_store_()
+{
+}
 
 size_t units_list_preview_pane::size() const
 {




Related Messages


Powered by MHonArc, Updated Tue Aug 12 21:43:02 2008