diff options
Diffstat (limited to 'core/templates/map.h')
-rw-r--r-- | core/templates/map.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/templates/map.h b/core/templates/map.h index f228640a1e..c54da1dc03 100644 --- a/core/templates/map.h +++ b/core/templates/map.h @@ -178,7 +178,7 @@ public: private: struct _Data { Element *_root = nullptr; - Element *_nil; + Element *_nil = nullptr; int size_cache = 0; _FORCE_INLINE_ _Data() { @@ -344,7 +344,7 @@ private: void _insert_rb_fix(Element *p_new_node) { Element *node = p_new_node; Element *nparent = node->parent; - Element *ngrand_parent; + Element *ngrand_parent = nullptr; while (nparent->color == RED) { ngrand_parent = nparent->parent; @@ -500,7 +500,7 @@ private: Element *rp = ((p_node->left == _data._nil) || (p_node->right == _data._nil)) ? p_node : p_node->_next; Element *node = (rp->left == _data._nil) ? rp->right : rp->left; - Element *sibling; + Element *sibling = nullptr; if (rp == rp->parent->left) { rp->parent->left = node; sibling = rp->parent->right; |