mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 13:30:36 +08:00
Lazy constructor init fix
This commit is contained in:
@@ -42,11 +42,14 @@ class LazyConstructor
|
||||
public:
|
||||
LazyConstructor()
|
||||
: ptr_(NULL)
|
||||
{ }
|
||||
{
|
||||
std::fill(data_, data_ + sizeof(T), 0);
|
||||
}
|
||||
|
||||
LazyConstructor(const LazyConstructor<T>& rhs)
|
||||
: ptr_(NULL)
|
||||
{
|
||||
std::fill(data_, data_ + sizeof(T), 0);
|
||||
if (rhs)
|
||||
construct(*rhs); // Invoke copy constructor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user