From 36abd7a3687cb20d059a8c930177277995b562e8 Mon Sep 17 00:00:00 2001 From: Tim King Date: Tue, 7 Nov 2017 17:16:04 -0800 Subject: [PATCH] Initializing TrailHashMap::d_uniqueKeys. (#1331) --- src/context/cdtrail_hashmap.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/context/cdtrail_hashmap.h b/src/context/cdtrail_hashmap.h index e64c51c65..bbd71f8cd 100644 --- a/src/context/cdtrail_hashmap.h +++ b/src/context/cdtrail_hashmap.h @@ -92,7 +92,6 @@ private: /** The trail of elements. */ KDTVec d_kdts; - typedef std::unordered_map PositionMap; typedef typename PositionMap::iterator PM_iterator; typedef typename PositionMap::const_iterator PM_const_iterator; @@ -124,13 +123,15 @@ private: } public: - /** - * Constant iterator for TrailHashMap. - * Only supports forward iteration. - * This always points at the end or a current element in the trail. - * This is done by iterating over the trail. - */ - class const_iterator { + TrailHashMap() : d_kdts{}, d_posMap{}, d_uniqueKeys(0) {} + + /** + * Constant iterator for TrailHashMap. + * Only supports forward iteration. + * This always points at the end or a current element in the trail. + * This is done by iterating over the trail. + */ + class const_iterator { private: /** A vector iterator. */ KDTVec_const_iterator d_it; -- 2.30.2