Skip to content

Commit a28b551

Browse files
committed
Fix compilation with gcc. Thanks Ivano.
1 parent df18059 commit a28b551

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/ifcparse/IfcWrite.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,18 @@ void IfcWritableEntity::setArgument(int i, Argument* a) {
159159
case IfcUtil::Argument_STRING:
160160
this->setArgument(i, static_cast<std::string>(*a));
161161
break;
162-
case IfcUtil::Argument_VECTOR_INT:
163-
this->setArgument(i, static_cast< std::vector<int> >(*a));
164-
break;
165-
case IfcUtil::Argument_VECTOR_DOUBLE:
166-
this->setArgument(i, static_cast< std::vector<double> >(*a));
167-
break;
168-
case IfcUtil::Argument_VECTOR_STRING:
169-
this->setArgument(i, static_cast< std::vector< std::string > >(*a));
170-
break;
162+
case IfcUtil::Argument_VECTOR_INT: {
163+
std::vector<int> attr_value = *a;
164+
this->setArgument(i, attr_value); }
165+
break;
166+
case IfcUtil::Argument_VECTOR_DOUBLE: {
167+
std::vector<double> attr_value = *a;
168+
this->setArgument(i, attr_value); }
169+
break;
170+
case IfcUtil::Argument_VECTOR_STRING: {
171+
std::vector<std::string> attr_value = *a;
172+
this->setArgument(i, attr_value); }
173+
break;
171174
case IfcUtil::Argument_ENUMERATION: {
172175
IfcSchema::Type::Enum ty = IfcSchema::Type::GetAttributeEntity(_type, i);
173176
std::string enum_literal = a->toString();

0 commit comments

Comments
 (0)