diff --git a/src/ifcparse/IfcEntityInstanceData.h b/src/ifcparse/IfcEntityInstanceData.h index 7d2c4ee8ca..6fb0386f38 100644 --- a/src/ifcparse/IfcEntityInstanceData.h +++ b/src/ifcparse/IfcEntityInstanceData.h @@ -48,17 +48,13 @@ public: : file(file_), id_(id), type_(type), attributes_(0), offset_in_file_(offset_in_file) {} - IfcEntityInstanceData(IfcParse::IfcFile* file_, size_t size) - : file(file_), id_(0), type_(0), attributes_(new Argument*[size]), offset_in_file_(0) + IfcEntityInstanceData(IfcParse::IfcFile* file_, size_t size) + : file(file_), id_(0), type_(0), attributes_(new Argument*[size] {0}), offset_in_file_(0) {} - IfcEntityInstanceData(const IfcParse::declaration* type) - : file(0), id_(0), type_(type), attributes_(new Argument*[getArgumentCount()]) - { - for (size_t i = 0; i < getArgumentCount(); ++i) { - attributes_[i] = 0; - } - } + IfcEntityInstanceData(const IfcParse::declaration* type) + : file(0), id_(0), type_(type), attributes_(new Argument*[getArgumentCount()]{ 0 }), offset_in_file_(0) + {} void load() const; diff --git a/src/ifcparse/IfcSpfHeader.cpp b/src/ifcparse/IfcSpfHeader.cpp index 5b95e68dcf..779b717152 100644 --- a/src/ifcparse/IfcSpfHeader.cpp +++ b/src/ifcparse/IfcSpfHeader.cpp @@ -43,11 +43,6 @@ HeaderEntity::HeaderEntity(const char * const datatype, size_t size, IfcFile* fi if (file) { offset_in_file_ = file->stream->Tell(); load(); - } else { - // attributes_ = new Argument*[size]; - for (size_t i = 0; i < size; ++i) { - attributes_[i] = 0; - } } }