gcc compatibility

This commit is contained in:
Thomas Krijnen
2018-04-14 20:06:25 +02:00
parent cb61873179
commit 05fd266a65
3 changed files with 11 additions and 11 deletions
+9 -9
View File
@@ -97,21 +97,21 @@ namespace IfcGeom {
template <typename Schema> template <typename Schema>
static std::map<std::string, typename Schema::IfcPresentationLayerAssignment*> get_layers(typename Schema::IfcProduct* prod) { static std::map<std::string, typename Schema::IfcPresentationLayerAssignment*> get_layers(typename Schema::IfcProduct* prod) {
std::map<std::string, Schema::IfcPresentationLayerAssignment*> layers; std::map<std::string, typename Schema::IfcPresentationLayerAssignment*> layers;
if (prod->hasRepresentation()) { if (prod->hasRepresentation()) {
IfcEntityList::ptr r = IfcParse::traverse(prod->Representation()); IfcEntityList::ptr r = IfcParse::traverse(prod->Representation());
Schema::IfcRepresentation::list::ptr representations = r->as<Schema::IfcRepresentation>(); typename Schema::IfcRepresentation::list::ptr representations = r->as<typename Schema::IfcRepresentation>();
for (Schema::IfcRepresentation::list::it it = representations->begin(); it != representations->end(); ++it) { for (typename Schema::IfcRepresentation::list::it it = representations->begin(); it != representations->end(); ++it) {
Schema::IfcPresentationLayerAssignment::list::ptr a = (*it)->LayerAssignments(); typename Schema::IfcPresentationLayerAssignment::list::ptr a = (*it)->LayerAssignments();
for (Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) { for (typename Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
layers[(*jt)->Name()] = *jt; layers[(*jt)->Name()] = *jt;
} }
} }
Schema::IfcRepresentationItem::list::ptr items = r->as<Schema::IfcRepresentationItem>(); typename Schema::IfcRepresentationItem::list::ptr items = r->as<typename Schema::IfcRepresentationItem>();
for (Schema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) { for (typename Schema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) {
Schema::IfcPresentationLayerAssignment::list::ptr a = getLayerAssignments(*it)->as<Schema::IfcPresentationLayerAssignment>(); typename Schema::IfcPresentationLayerAssignment::list::ptr a = getLayerAssignments(*it)->template as<typename Schema::IfcPresentationLayerAssignment>();
for (Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) { for (typename Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
layers[(*jt)->Name()] = *jt; layers[(*jt)->Name()] = *jt;
} }
} }
+1 -1
View File
@@ -24,7 +24,7 @@ XmlSerializer* XmlSerializerFactory::Factory::construct(const std::string& schem
} }
XmlSerializer::XmlSerializer(IfcParse::IfcFile* file, const std::string& xml_filename) { XmlSerializer::XmlSerializer(IfcParse::IfcFile* file, const std::string& xml_filename) {
if (file != nullptr) { if (file) {
implementation_ = XmlSerializerFactory::implementations().construct(file->schema()->name(), file, xml_filename); implementation_ = XmlSerializerFactory::implementations().construct(file->schema()->name(), file, xml_filename);
} }
} }
@@ -32,7 +32,7 @@ private:
public: public:
MAKE_TYPE_NAME(XmlSerializer)(IfcParse::IfcFile* file, const std::string& xml_filename) MAKE_TYPE_NAME(XmlSerializer)(IfcParse::IfcFile* file, const std::string& xml_filename)
: XmlSerializer(nullptr, "") : XmlSerializer(0, "")
{ {
this->file = file; this->file = file;
this->xml_filename = xml_filename; this->xml_filename = xml_filename;