summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 21:07:58 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-07 07:13:17 +0100
commita8aa8b394e1419e367eda8774d47c4c79c0aa2ea (patch)
tree72de21c637fc28e876d73ec7ca16b747e3e6a556
parent65399d69a35dff75ec25aaa193102443862b8bed (diff)
downloadcrawl-ref-a8aa8b394e1419e367eda8774d47c4c79c0aa2ea.tar.gz
crawl-ref-a8aa8b394e1419e367eda8774d47c4c79c0aa2ea.zip
los_def: Implement default constructor and initialize field show.
-rw-r--r--crawl-ref/source/los.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index 543e71b0de..e28f91e94a 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -917,9 +917,14 @@ void losight(env_show_grid& sh, const coord_def& center,
// class los_def
+los_def::los_def()
+ : show(0), opc(opc_default.clone()), bds(bds_default.clone())
+{
+}
+
los_def::los_def(const coord_def& c, const opacity_func &o,
const bounds_func &b)
- : center(c), opc(o.clone()), bds(b.clone())
+ : show(0), center(c), opc(o.clone()), bds(b.clone())
{
}
@@ -939,6 +944,7 @@ los_def& los_def::operator=(const los_def& los)
void los_def::init(const coord_def &c, const opacity_func &o,
const bounds_func &b)
{
+ show.init(0);
set_center(c);
set_opacity(o);
set_bounds(b);