0023040: Annoying warnings in NCollection_Vector
authorkgv <kgv@opencascade.com>
Sat, 9 Jun 2012 04:38:40 +0000 (08:38 +0400)
committerkgv <kgv@opencascade.com>
Fri, 15 Jun 2012 07:52:11 +0000 (11:52 +0400)
Fixed initialization order of class members in constructors

src/IntPatch/IntPatch_Point.lxx
src/NCollection/NCollection_BaseVector.hxx

index 3e5b9ee..ad9a674 100755 (executable)
@@ -23,9 +23,7 @@
 inline IntPatch_Point::IntPatch_Point ()
  : para(0.0), tol(0.0), tgt(Standard_False), mult(Standard_False),
    onS1(Standard_False), vtxonS1(Standard_False), prm1(0.0),
 inline IntPatch_Point::IntPatch_Point ()
  : para(0.0), tol(0.0), tgt(Standard_False), mult(Standard_False),
    onS1(Standard_False), vtxonS1(Standard_False), prm1(0.0),
-   onS2(Standard_False), vtxonS2(Standard_False), prm2(0.0),
-   vS1(NULL), vS2(NULL),
-   arcS1(NULL), arcS2(NULL)
+   onS2(Standard_False), vtxonS2(Standard_False), prm2(0.0)
 {
 }
 
 {
 }
 
@@ -55,7 +53,7 @@ inline void IntPatch_Point::SetParameter (const Standard_Real Para)
 {
   para = Para;
 }
 {
   para = Para;
 }
+
 
 inline void IntPatch_Point::SetMultiple (const Standard_Boolean IsMult)
 {
 
 inline void IntPatch_Point::SetMultiple (const Standard_Boolean IsMult)
 {
@@ -207,6 +205,6 @@ inline const IntSurf_PntOn2S& IntPatch_Point::PntOn2S() const
 
 inline void IntPatch_Point::Parameters(Standard_Real& U1, Standard_Real& V1,
                                       Standard_Real& U2, Standard_Real& V2) const
 
 inline void IntPatch_Point::Parameters(Standard_Real& U1, Standard_Real& V1,
                                       Standard_Real& U2, Standard_Real& V2) const
-{ 
+{
   pt.Parameters(U1,V1,U2,V2);
 }
   pt.Parameters(U1,V1,U2,V2);
 }
index 306fb5a..5506ec0 100755 (executable)
@@ -45,7 +45,7 @@ inline Standard_Integer GetCapacity (const Standard_Integer theIncrement)
 /**
  *  Class NCollection_BaseVector - base for generic vector
  */
 /**
  *  Class NCollection_BaseVector - base for generic vector
  */
-class NCollection_BaseVector 
+class NCollection_BaseVector
 {
  public:
   // ------------ Class MemBlock ------------
 {
  public:
   // ------------ Class MemBlock ------------
@@ -53,12 +53,18 @@ class NCollection_BaseVector
   protected:
     MemBlock (NCollection_BaseAllocator* theAlloc)
       : myAlloc(theAlloc),
   protected:
     MemBlock (NCollection_BaseAllocator* theAlloc)
       : myAlloc(theAlloc),
-        myFirstInd(0), myLength(0), mySize(0), myData(0L) {}
+        myData(NULL),
+        myFirstInd(0),
+        myLength(0),
+        mySize(0) {}
     MemBlock (const Standard_Integer theFirstInd,
               const Standard_Integer theLength,
               NCollection_BaseAllocator* theAlloc)
       : myAlloc(theAlloc),
     MemBlock (const Standard_Integer theFirstInd,
               const Standard_Integer theLength,
               NCollection_BaseAllocator* theAlloc)
       : myAlloc(theAlloc),
-        myFirstInd(theFirstInd), myLength(0), mySize(theLength), myData(0L) {}
+        myData(NULL),
+        myFirstInd(theFirstInd),
+        myLength(0),
+        mySize(theLength) {}
     virtual void        Reinit     (const Standard_Integer,
                                     const Standard_Integer) {}
     Standard_Integer    FirstIndex () const     { return myFirstInd; }
     virtual void        Reinit     (const Standard_Integer,
                                     const Standard_Integer) {}
     Standard_Integer    FirstIndex () const     { return myFirstInd; }
@@ -74,11 +80,11 @@ class NCollection_BaseVector
     Standard_EXPORT Standard_Integer
                         GetIndexV  (void * theItem, const size_t theSz) const;
   protected:
     Standard_EXPORT Standard_Integer
                         GetIndexV  (void * theItem, const size_t theSz) const;
   protected:
+    NCollection_BaseAllocator*   myAlloc;
+    void*                        myData;
     Standard_Integer             myFirstInd;
     Standard_Integer             myLength;
     Standard_Integer             mySize;
     Standard_Integer             myFirstInd;
     Standard_Integer             myLength;
     Standard_Integer             mySize;
-    NCollection_BaseAllocator    * myAlloc;
-    void                         * myData;
     friend class NCollection_BaseVector;
   };
 
     friend class NCollection_BaseVector;
   };