diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index 4445f31e58..c6945f0916 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -159,8 +159,9 @@ void IfcWritableEntity::setArgument(int i, Argument* a) { case IfcUtil::Argument_STRING: this->setArgument(i, static_cast(*a)); break; - case IfcUtil::Argument_BINARY: - this->setArgument(i, static_cast< boost::dynamic_bitset<> >(*a)); + case IfcUtil::Argument_BINARY: { + boost::dynamic_bitset<> attr_value = *a; + this->setArgument(i, attr_value); } break; case IfcUtil::Argument_AGGREGATE_OF_INT: { std::vector attr_value = *a;