From b6d3906895400d6958bd2384b5ba42c4b10b608d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 31 Jul 2016 23:16:08 +0200 Subject: [PATCH] Use value-initialized pointers when null is required, as conversion from literal 0 is not guaranteed in smart pointers. --- include/boost/container/vector.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/container/vector.hpp b/include/boost/container/vector.hpp index 196b8a3..01c9a29 100644 --- a/include/boost/container/vector.hpp +++ b/include/boost/container/vector.hpp @@ -380,7 +380,7 @@ struct vector_alloc_holder , m_capacity() { if(initial_size){ - pointer reuse = 0; + pointer reuse = pointer(); m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse); } } @@ -393,7 +393,7 @@ struct vector_alloc_holder , m_capacity() { if(initial_size){ - pointer reuse = 0; + pointer reuse = pointer(); m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse); } } @@ -525,7 +525,7 @@ struct vector_alloc_holder void priv_first_allocation(size_type cap) { if(cap){ - pointer reuse = 0; + pointer reuse = pointer(); m_start = this->allocation_command(allocate_new, cap, cap, reuse); m_capacity = cap; #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS