Merge branch 'master' into errorstr

This commit is contained in:
Lee Thomason
2017-10-11 10:57:52 -07:00
5 changed files with 82 additions and 44 deletions

View File

@@ -192,10 +192,11 @@ template <class T, int INITIAL_SIZE>
class DynArray
{
public:
DynArray() {
_mem = _pool;
_allocated = INITIAL_SIZE;
_size = 0;
DynArray() :
_mem( _pool ),
_allocated( INITIAL_SIZE ),
_size( 0 )
{
}
~DynArray() {
@@ -333,7 +334,7 @@ template< int ITEM_SIZE >
class MemPoolT : public MemPool
{
public:
MemPoolT() : _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {}
MemPoolT() : _blockPtrs(), _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {}
~MemPoolT() {
Clear();
}
@@ -1211,7 +1212,7 @@ public:
private:
enum { BUF_SIZE = 200 };
XMLAttribute() : _parseLineNum( 0 ), _next( 0 ), _memPool( 0 ) {}
XMLAttribute() : _name(), _value(),_parseLineNum( 0 ), _next( 0 ), _memPool( 0 ) {}
virtual ~XMLAttribute() {}
XMLAttribute( const XMLAttribute& ); // not supported
@@ -1953,16 +1954,13 @@ class TINYXML2_LIB XMLHandle
{
public:
/// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
XMLHandle( XMLNode* node ) {
_node = node;
XMLHandle( XMLNode* node ) : _node( node ) {
}
/// Create a handle from a node.
XMLHandle( XMLNode& node ) {
_node = &node;
XMLHandle( XMLNode& node ) : _node( &node ) {
}
/// Copy constructor
XMLHandle( const XMLHandle& ref ) {
_node = ref._node;
XMLHandle( const XMLHandle& ref ) : _node( ref._node ) {
}
/// Assignment
XMLHandle& operator=( const XMLHandle& ref ) {
@@ -2036,14 +2034,11 @@ private:
class TINYXML2_LIB XMLConstHandle
{
public:
XMLConstHandle( const XMLNode* node ) {
_node = node;
XMLConstHandle( const XMLNode* node ) : _node( node ) {
}
XMLConstHandle( const XMLNode& node ) {
_node = &node;
XMLConstHandle( const XMLNode& node ) : _node( &node ) {
}
XMLConstHandle( const XMLConstHandle& ref ) {
_node = ref._node;
XMLConstHandle( const XMLConstHandle& ref ) : _node( ref._node ) {
}
XMLConstHandle& operator=( const XMLConstHandle& ref ) {
@@ -2258,6 +2253,10 @@ private:
bool _restrictedEntityFlag[ENTITY_RANGE];
DynArray< char, 20 > _buffer;
// Prohibit cloning, intentionally not implemented
XMLPrinter( const XMLPrinter& );
XMLPrinter& operator=( const XMLPrinter& );
};