]> OCCT Git - occt.git/commitdiff
0032910: Coding Rules - fix uninitialized class fields in constructor initialization...
authorddzama <ddzama@opencascade.com>
Thu, 31 Mar 2022 04:26:39 +0000 (07:26 +0300)
committersmoskvin <smoskvin@opencascade.com>
Fri, 8 Apr 2022 15:52:41 +0000 (18:52 +0300)
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warnings about uninitialized class fields in constructor initialization block.

src/NCollection/NCollection_BaseVector.hxx
src/SelectMgr/SelectMgr_BVHThreadPool.hxx

index db68b8613d05179da52adf3336af85c34b43a63e..7c8941818ab50efe8cfc9a3d23c9c2bb332fecbb 100755 (executable)
@@ -69,7 +69,8 @@ protected:
   {
   protected:
     Iterator()
-    : myICurBlock (0),
+    : myVector    (nullptr),
+      myICurBlock (0),
       myIEndBlock (0),
       myCurIndex  (0),
       myEndIndex  (0) {}
index 84d8ab37653086ee87ad5e539dd3049e3b1865a0..3dd7afd0ad9b0543e86c7285032aca0c9b29282b 100644 (file)
@@ -42,6 +42,8 @@ public:
 
     BVHThread()
       : OSD_Thread(),
+      myPool(nullptr),
+      myMutex(),
       myToCatchFpe (Standard_False)
     {