mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Lazy constructor init fix
This commit is contained in:
parent
fd454a77f8
commit
7b4ef80c40
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user