IfcSchema declaration_by_name to use size_t instead of int

By accident noticed that `declaration_by_name(-1)` crashes python. If we use size_t it will just throw an error like below

NotImplementedError: Wrong number or type of arguments for overloaded function 'schema_definition_declaration_by_name'.
  Possible C/C++ prototypes are:
    IfcParse::schema_definition::declaration_by_name(std::string const &) const
    IfcParse::schema_definition::declaration_by_name(size_t) const
This commit is contained in:
Andrej730
2024-09-16 18:37:53 +05:00
parent 0d77ff5270
commit 11ddcb0256
+1 -1
View File
@@ -495,7 +495,7 @@ class IFC_PARSE_API schema_definition {
return *iter;
}
const declaration* declaration_by_name(int name) const {
const declaration* declaration_by_name(size_t name) const {
return declarations_[name];
}