Fix compilation with gcc. Thanks Ivano.

This commit is contained in:
Thomas Krijnen
2015-03-13 10:40:31 +00:00
parent df1805921b
commit a28b5517e8
+12 -9
View File
@@ -159,15 +159,18 @@ void IfcWritableEntity::setArgument(int i, Argument* a) {
case IfcUtil::Argument_STRING: case IfcUtil::Argument_STRING:
this->setArgument(i, static_cast<std::string>(*a)); this->setArgument(i, static_cast<std::string>(*a));
break; break;
case IfcUtil::Argument_VECTOR_INT: case IfcUtil::Argument_VECTOR_INT: {
this->setArgument(i, static_cast< std::vector<int> >(*a)); std::vector<int> attr_value = *a;
break; this->setArgument(i, attr_value); }
case IfcUtil::Argument_VECTOR_DOUBLE: break;
this->setArgument(i, static_cast< std::vector<double> >(*a)); case IfcUtil::Argument_VECTOR_DOUBLE: {
break; std::vector<double> attr_value = *a;
case IfcUtil::Argument_VECTOR_STRING: this->setArgument(i, attr_value); }
this->setArgument(i, static_cast< std::vector< std::string > >(*a)); break;
break; case IfcUtil::Argument_VECTOR_STRING: {
std::vector<std::string> attr_value = *a;
this->setArgument(i, attr_value); }
break;
case IfcUtil::Argument_ENUMERATION: { case IfcUtil::Argument_ENUMERATION: {
IfcSchema::Type::Enum ty = IfcSchema::Type::GetAttributeEntity(_type, i); IfcSchema::Type::Enum ty = IfcSchema::Type::GetAttributeEntity(_type, i);
std::string enum_literal = a->toString(); std::string enum_literal = a->toString();