From 377410723ab0a8350d979c05536c3eafc05f2b66 Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Thu, 19 Jun 2014 20:13:26 -0400 Subject: [PATCH] fixup: initialize ref_count_ to 0 in units --- src/unit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unit.cpp b/src/unit.cpp index cdb10a0bc34d..393669a7ec1b 100644 --- a/src/unit.cpp +++ b/src/unit.cpp @@ -136,6 +136,7 @@ const std::string& unit::leader_crown() // Copy constructor unit::unit(const unit& o): + ref_count_(0), cfg_(o.cfg_), loc_(o.loc_), advances_to_(o.advances_to_), @@ -215,6 +216,7 @@ unit::unit(const unit& o): } unit::unit(const config &cfg, bool use_traits, const vconfig* vcfg) : + ref_count_(0), cfg_(), loc_(cfg["x"] - 1, cfg["y"] - 1), advances_to_(), @@ -512,6 +514,7 @@ void unit::clear_status_caches() unit::unit(const unit_type &u_type, int side, bool real_unit, unit_race::GENDER gender) : + ref_count_(0), cfg_(), loc_(), advances_to_(),