From a8aa8b394e1419e367eda8774d47c4c79c0aa2ea Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 21:07:58 +0100 Subject: los_def: Implement default constructor and initialize field show. --- crawl-ref/source/los.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-54-g00ecf