mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
ifcparse: fix clang-tidy warning readability-else-after-return
This commit is contained in:
committed by
Thomas Krijnen
parent
b264408d85
commit
9f40674d91
@@ -74,7 +74,8 @@ bool IfcParse::declaration::is(const std::string& name) const {
|
||||
|
||||
if (this->as_entity() && this->as_entity()->supertype()) {
|
||||
return this->as_entity()->supertype()->is(name);
|
||||
} else if (this->as_type_declaration()) {
|
||||
}
|
||||
if (this->as_type_declaration()) {
|
||||
const IfcParse::named_type* nt = this->as_type_declaration()->declared_type()->as_named_type();
|
||||
if (nt) {
|
||||
return nt->is(name);
|
||||
@@ -91,7 +92,8 @@ bool IfcParse::declaration::is(const IfcParse::declaration& decl) const {
|
||||
|
||||
if (this->as_entity() && this->as_entity()->supertype()) {
|
||||
return this->as_entity()->supertype()->is(decl);
|
||||
} else if (this->as_type_declaration()) {
|
||||
}
|
||||
if (this->as_type_declaration()) {
|
||||
const IfcParse::named_type* nt = this->as_type_declaration()->declared_type()->as_named_type();
|
||||
if (nt) {
|
||||
return nt->is(decl);
|
||||
@@ -153,9 +155,8 @@ IfcParse::schema_definition::~schema_definition() {
|
||||
IfcUtil::IfcBaseClass* IfcParse::schema_definition::instantiate(IfcEntityInstanceData* data) const {
|
||||
if (factory_) {
|
||||
return (*factory_)(data);
|
||||
} else {
|
||||
return new IfcUtil::IfcLateBoundEntity(data->type(), data);
|
||||
}
|
||||
return new IfcUtil::IfcLateBoundEntity(data->type(), data);
|
||||
}
|
||||
|
||||
void IfcParse::register_schema(schema_definition* s) {
|
||||
|
||||
Reference in New Issue
Block a user