summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/show.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-04 12:01:16 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-04 12:01:41 -0800
commit5eeaf5d109c3c19ebe83bc10278dbf5fffd37af8 (patch)
tree36cb4d6f472fb9fb8c065a2a33b322ce44d91108 /crawl-ref/source/show.cc
parent612f495b38845763f43bb1c0b52061359a0b3f6a (diff)
downloadcrawl-ref-5eeaf5d109c3c19ebe83bc10278dbf5fffd37af8.tar.gz
crawl-ref-5eeaf5d109c3c19ebe83bc10278dbf5fffd37af8.zip
show: Quiet Valgrind warnings
Diffstat (limited to 'crawl-ref/source/show.cc')
-rw-r--r--crawl-ref/source/show.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index 3a5e8908c4..35f2fb1a0f 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -27,19 +27,26 @@ void get_show_symbol(show_type object, unsigned *ch,
*colour = real_colour(*colour);
}
+show_type::show_type()
+ : cls(SH_NOTHING), colour(0)
+{
+ // To quiet Valgrind warnings.
+ feat = (dungeon_feature_type) -1;
+}
+
show_type::show_type(const monsters* m)
- : cls(SH_MONSTER), mons(m->type) {}
+ : cls(SH_MONSTER), mons(m->type), colour(0) {}
show_type::show_type(dungeon_feature_type f)
- : cls(SH_FEATURE), feat(f) {}
+ : cls(SH_FEATURE), feat(f), colour(0) {}
static show_item_type _item_to_show_code(const item_def &item);
show_type::show_type(const item_def &it)
- : cls(SH_ITEM), item(_item_to_show_code(it)) {}
+ : cls(SH_ITEM), item(_item_to_show_code(it)), colour(0) {}
show_type::show_type(show_item_type t)
- : cls(SH_ITEM), item(t) {}
+ : cls(SH_ITEM), item(t), colour(0) {}
bool show_type::operator < (const show_type &other) const
{