From 6d7ee6488ff9438bb7169792d66a82b7a88948b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 16 Jun 2014 00:20:53 +0200 Subject: [PATCH] Fix possibly uninitialized member --- include/boost/intrusive/sgtree.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/boost/intrusive/sgtree.hpp b/include/boost/intrusive/sgtree.hpp index 2b7cb60..cd4d8bc 100644 --- a/include/boost/intrusive/sgtree.hpp +++ b/include/boost/intrusive/sgtree.hpp @@ -133,7 +133,8 @@ struct alpha_holder typedef boost::intrusive::detail::h_alpha_t h_alpha_t; typedef boost::intrusive::detail::alpha_by_max_size_t multiply_by_alpha_t; - alpha_holder() : max_tree_size_(0) + alpha_holder() + : max_tree_size_() { set_alpha(0.70711f); } // ~1/sqrt(2) float get_alpha() const @@ -166,6 +167,10 @@ struct alpha_holder typedef boost::intrusive::detail::h_alpha_sqrt2_t h_alpha_t; typedef boost::intrusive::detail::alpha_0_75_by_max_size_t multiply_by_alpha_t; + alpha_holder() + : max_tree_size_() + {} + float get_alpha() const { return 0.70710677f; }