From a28b5517e8aec70e4f0c674f53898b0116031997 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 13 Mar 2015 10:40:31 +0000 Subject: [PATCH] Fix compilation with gcc. Thanks Ivano. --- src/ifcparse/IfcWrite.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index a95fa39cc8..6d35548efe 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -159,15 +159,18 @@ void IfcWritableEntity::setArgument(int i, Argument* a) { case IfcUtil::Argument_STRING: this->setArgument(i, static_cast(*a)); break; - case IfcUtil::Argument_VECTOR_INT: - this->setArgument(i, static_cast< std::vector >(*a)); - break; - case IfcUtil::Argument_VECTOR_DOUBLE: - this->setArgument(i, static_cast< std::vector >(*a)); - break; - case IfcUtil::Argument_VECTOR_STRING: - this->setArgument(i, static_cast< std::vector< std::string > >(*a)); - break; + case IfcUtil::Argument_VECTOR_INT: { + std::vector attr_value = *a; + this->setArgument(i, attr_value); } + break; + case IfcUtil::Argument_VECTOR_DOUBLE: { + std::vector attr_value = *a; + this->setArgument(i, attr_value); } + break; + case IfcUtil::Argument_VECTOR_STRING: { + std::vector attr_value = *a; + this->setArgument(i, attr_value); } + break; case IfcUtil::Argument_ENUMERATION: { IfcSchema::Type::Enum ty = IfcSchema::Type::GetAttributeEntity(_type, i); std::string enum_literal = a->toString();