Author: mordante
Date: Thu Aug 14 18:22:21 2008
New Revision: 28582
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28582&view=rev
Log:
Initialize all members.
Modified:
trunk/src/theme.cpp
Modified: trunk/src/theme.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/theme.cpp?rev=28582&r1=28581&r2=28582&view=diff
==============================================================================
--- trunk/src/theme.cpp (original)
+++ trunk/src/theme.cpp Thu Aug 14 18:22:21 2008
@@ -275,8 +275,14 @@
}
}
-theme::object::object() : location_modified_(false), loc_(empty_rect),
relative_loc_(empty_rect),
- last_screen_(empty_rect), xanchor_(object::FIXED),
yanchor_(object::FIXED)
+theme::object::object() :
+ location_modified_(false),
+ id_(),
+ loc_(empty_rect),
+ relative_loc_(empty_rect),
+ last_screen_(empty_rect),
+ xanchor_(object::FIXED),
+ yanchor_(object::FIXED)
{
}
@@ -288,7 +294,21 @@
}
theme::tborder::tborder() :
- size(0.0)
+ size(0.0),
+ background_image(),
+ tile_image(),
+ corner_image_top_left(),
+ corner_image_bottom_left(),
+ corner_image_top_right_odd(),
+ corner_image_top_right_even(),
+ corner_image_bottom_right_odd(),
+ corner_image_bottom_right_even(),
+ border_image_left(),
+ border_image_right(),
+ border_image_top_odd(),
+ border_image_top_even(),
+ border_image_bottom_odd(),
+ border_image_bottom_even()
{
}
@@ -417,18 +437,25 @@
modify_location(rect);
}
-theme::label::label()
+theme::label::label() :
+ text_(),
+ icon_(),
+ font_(),
+ font_rgb_set_(false),
+ font_rgb_(DefaultFontRGB)
{}
-theme::label::label(const config& cfg)
- : object(cfg), text_(cfg["prefix"].str() + cfg["text"].str() +
cfg["postfix"].str()),
- icon_(cfg["icon"]), font_(atoi(cfg["font_size"].c_str()))
+theme::label::label(const config& cfg) :
+ object(cfg),
+ text_(cfg["prefix"].str() + cfg["text"].str() + cfg["postfix"].str()),
+ icon_(cfg["icon"]),
+ font_(atoi(cfg["font_size"].c_str())),
+ font_rgb_set_(false),
+ font_rgb_(DefaultFontRGB)
{
if(font_ == 0)
font_ = DefaultFontSize;
- font_rgb_ = DefaultFontRGB;
- font_rgb_set_ = false;
if(cfg["font_rgb"].size()){
std::vector<std::string> rgb_vec = utils::split(cfg["font_rgb"]);
if(3 <= rgb_vec.size()){
@@ -453,11 +480,14 @@
}
}
-theme::status_item::status_item(const config& cfg)
- : object(cfg),
- prefix_(cfg["prefix"].str() + cfg["prefix_literal"].str()),
- postfix_(cfg["postfix_literal"].str() + cfg["postfix"].str()),
- font_(atoi(cfg["font_size"].c_str()))
+theme::status_item::status_item(const config& cfg) :
+ object(cfg),
+ prefix_(cfg["prefix"].str() + cfg["prefix_literal"].str()),
+ postfix_(cfg["postfix_literal"].str() + cfg["postfix"].str()),
+ label_(),
+ font_(atoi(cfg["font_size"].c_str())),
+ font_rgb_set_(false),
+ font_rgb_(DefaultFontRGB)
{
if(font_ == 0)
font_ = DefaultFontSize;
@@ -467,8 +497,6 @@
label_ = label(*label_child);
}
- font_rgb_ = DefaultFontRGB;
- font_rgb_set_ = false;
if(cfg["font_rgb"].size()){
std::vector<std::string> rgb_vec = utils::split(cfg["font_rgb"]);
if(3 <= rgb_vec.size()){
@@ -496,7 +524,14 @@
theme::panel::panel(const config& cfg) : object(cfg), image_(cfg["image"])
{}
-theme::menu::menu() : context_(false)
+theme::menu::menu() :
+ object(),
+ context_(false),
+ title_(),
+ tooltip_(),
+ image_(),
+ type_(),
+ items_()
{}
theme::menu::menu(const config& cfg) : object(cfg),
@@ -512,7 +547,18 @@
}
theme::theme(const config& cfg, const SDL_Rect& screen) :
- theme_reset_("theme_reset")
+ theme_reset_("theme_reset"),
+ cur_theme(),
+ cfg_(),
+ panels_(),
+ labels_(),
+ menus_(),
+ context_(),
+ status_(),
+ main_map_(),
+ mini_map_(),
+ unit_image_(),
+ border_()
{
config tmp;
expand_partialresolution(tmp, cfg);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits