diff options
Diffstat (limited to 'core/map.h')
-rw-r--r-- | core/map.h | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/core/map.h b/core/map.h index 6b9dff51de..621b6c2842 100644 --- a/core/map.h +++ b/core/map.h @@ -51,12 +51,12 @@ public: private: friend class Map<K, V, C, A>; - int color; - Element *right; - Element *left; - Element *parent; - Element *_next; - Element *_prev; + int color = RED; + Element *right = nullptr; + Element *left = nullptr; + Element *parent = nullptr; + Element *_next = nullptr; + Element *_prev = nullptr; K _key; V _value; //_Data *data; @@ -93,22 +93,15 @@ public: const V &get() const { return _value; }; - Element() { - color = RED; - right = nullptr; - left = nullptr; - parent = nullptr; - _next = nullptr; - _prev = nullptr; - }; + Element() {} }; private: struct _Data { - Element *_root; + Element *_root = nullptr; Element *_nil; - int size_cache; + int size_cache = 0; _FORCE_INLINE_ _Data() { #ifdef GLOBALNIL_DISABLED @@ -118,8 +111,6 @@ private: #else _nil = (Element *)&_GlobalNilClass::_nil; #endif - _root = nullptr; - size_cache = 0; } void _create_root() { @@ -673,8 +664,7 @@ public: _copy_from(p_map); } - _FORCE_INLINE_ Map() { - } + _FORCE_INLINE_ Map() {} ~Map() { |