mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
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:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user