IfcSiPrefix.cpp changes for MSVC 2013

IfcHierarchyHelper.h:176,185 changes in addRelatedObject about throw exception
exception comes from

ifcparse/IfcHierarchyHelper.h line 176 get_parent_of_relation(rel)
if (get_parent_of_relation(rel) == relating_object) {

ifcparse/IfcHierarchyHelper.h line 47
IfcUtil::IfcBaseClass* get_parent_of_relation(IfcUtil::IfcBaseClass* t)

ifcparse/IfcSchema.h
ptrdiff_t attribute_index(const std::string& attr_name) const {

ptrdiff_t index = -1;

-1 return but getArgument(..) Parameter is unsigned int
in the methode -1 is ca. 42123423423423 and throw IfcParse::IfcAttributeOutOfRangeException
we catch this exception and all works as expected and before in 0.5-rc1
This commit is contained in:
Stefan Fink
2020-07-14 12:17:13 +02:00
committed by Thomas Krijnen
parent 9d6e7c2481
commit ea71a1f8a7
2 changed files with 18 additions and 7 deletions
+8
View File
@@ -73,8 +73,16 @@ double IfcParse::get_SI_equivalent(typename Schema::IfcNamedUnit* named_unit) {
return scale;
}
#if _MSC_VER < 1900
template double IfcParse::get_SI_equivalent<Ifc2x3>(Ifc2x3::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4>(Ifc4::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x1>(Ifc4x1::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x2>(Ifc4x2::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x3_rc1>(Ifc4x3_rc1::IfcNamedUnit* named_unit);
#else
template double IfcParse::get_SI_equivalent<Ifc2x3>(typename Ifc2x3::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4>(typename Ifc4::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x1>(typename Ifc4x1::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x2>(typename Ifc4x2::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x3_rc1>(typename Ifc4x3_rc1::IfcNamedUnit* named_unit);
#endif