Просмотр исходного кода

Merge pull request #111 from pzychotic/master

Initialize pointers in constructor
Lee Thomason 12 лет назад
Родитель
Сommit
6db1321100
2 измененных файлов с 3 добавлено и 2 удалено
  1. 2 1
      tinyxml2.cpp
  2. 1 1
      tinyxml2.h

+ 2 - 1
tinyxml2.cpp

@@ -581,7 +581,8 @@ XMLNode::XMLNode( XMLDocument* doc ) :
     _document( doc ),
     _parent( 0 ),
     _firstChild( 0 ), _lastChild( 0 ),
-    _prev( 0 ), _next( 0 )
+    _prev( 0 ), _next( 0 ),
+    _memPool( 0 )
 {
 }
 

+ 1 - 1
tinyxml2.h

@@ -1069,7 +1069,7 @@ public:
 private:
     enum { BUF_SIZE = 200 };
 
-    XMLAttribute() : _next( 0 ) {}
+    XMLAttribute() : _next( 0 ), _memPool( 0 ) {}
     virtual ~XMLAttribute()	{}
 
     XMLAttribute( const XMLAttribute& );	// not supported