ifcparse: fix clang-tidy warning readability-else-after-return

This commit is contained in:
Dirk Olbrich
2023-10-24 12:21:32 +02:00
committed by Thomas Krijnen
parent b264408d85
commit 9f40674d91
12 changed files with 160 additions and 161 deletions
+5 -4
View File
@@ -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) {