Browse Source

coverity scan: fix not initialized member in copy constructor.

Kim Kulling 9 năm trước cách đây
mục cha
commit
ec32da512b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      code/Importer.cpp

+ 2 - 2
code/Importer.cpp

@@ -140,7 +140,7 @@ void AllocateFromAssimpHeap::operator delete[] ( void* data)    {
 // ------------------------------------------------------------------------------------------------
 // Importer constructor.
 Importer::Importer()
-{
+ : pimpl( NULL ) {
     // allocate the pimpl first
     pimpl = new ImporterPimpl();
 
@@ -197,7 +197,7 @@ Importer::~Importer()
 // ------------------------------------------------------------------------------------------------
 // Copy constructor - copies the config of another Importer, not the scene
 Importer::Importer(const Importer &other)
-{
+	: pimpl(NULL) {
     new(this) Importer();
 
     pimpl->mIntProperties    = other.pimpl->mIntProperties;