Lazy constructor init fix

This commit is contained in:
Pavel Kirienko
2014-03-08 18:53:42 +04:00
parent fd454a77f8
commit 7b4ef80c40
@@ -42,11 +42,14 @@ class LazyConstructor
public: public:
LazyConstructor() LazyConstructor()
: ptr_(NULL) : ptr_(NULL)
{ } {
std::fill(data_, data_ + sizeof(T), 0);
}
LazyConstructor(const LazyConstructor<T>& rhs) LazyConstructor(const LazyConstructor<T>& rhs)
: ptr_(NULL) : ptr_(NULL)
{ {
std::fill(data_, data_ + sizeof(T), 0);
if (rhs) if (rhs)
construct(*rhs); // Invoke copy constructor construct(*rhs); // Invoke copy constructor
} }