mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
gcc compatibility
This commit is contained in:
@@ -97,21 +97,21 @@ namespace IfcGeom {
|
||||
|
||||
template <typename Schema>
|
||||
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()) {
|
||||
IfcEntityList::ptr r = IfcParse::traverse(prod->Representation());
|
||||
Schema::IfcRepresentation::list::ptr representations = r->as<Schema::IfcRepresentation>();
|
||||
for (Schema::IfcRepresentation::list::it it = representations->begin(); it != representations->end(); ++it) {
|
||||
Schema::IfcPresentationLayerAssignment::list::ptr a = (*it)->LayerAssignments();
|
||||
for (Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
|
||||
typename Schema::IfcRepresentation::list::ptr representations = r->as<typename Schema::IfcRepresentation>();
|
||||
for (typename Schema::IfcRepresentation::list::it it = representations->begin(); it != representations->end(); ++it) {
|
||||
typename Schema::IfcPresentationLayerAssignment::list::ptr a = (*it)->LayerAssignments();
|
||||
for (typename Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
|
||||
layers[(*jt)->Name()] = *jt;
|
||||
}
|
||||
}
|
||||
|
||||
Schema::IfcRepresentationItem::list::ptr items = r->as<Schema::IfcRepresentationItem>();
|
||||
for (Schema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) {
|
||||
Schema::IfcPresentationLayerAssignment::list::ptr a = getLayerAssignments(*it)->as<Schema::IfcPresentationLayerAssignment>();
|
||||
for (Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
|
||||
typename Schema::IfcRepresentationItem::list::ptr items = r->as<typename Schema::IfcRepresentationItem>();
|
||||
for (typename Schema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) {
|
||||
typename Schema::IfcPresentationLayerAssignment::list::ptr a = getLayerAssignments(*it)->template as<typename Schema::IfcPresentationLayerAssignment>();
|
||||
for (typename Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
|
||||
layers[(*jt)->Name()] = *jt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ XmlSerializer* XmlSerializerFactory::Factory::construct(const std::string& schem
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
|
||||
public:
|
||||
MAKE_TYPE_NAME(XmlSerializer)(IfcParse::IfcFile* file, const std::string& xml_filename)
|
||||
: XmlSerializer(nullptr, "")
|
||||
: XmlSerializer(0, "")
|
||||
{
|
||||
this->file = file;
|
||||
this->xml_filename = xml_filename;
|
||||
|
||||
Reference in New Issue
Block a user