Commit bf4d69f6 authored by Stefan Behnel's avatar Stefan Behnel

minor code cleanup

parent 73ee6c35
...@@ -2023,7 +2023,7 @@ class CppClassScope(Scope): ...@@ -2023,7 +2023,7 @@ class CppClassScope(Scope):
# Look for default constructors in all base classes. # Look for default constructors in all base classes.
if self.default_constructor is None: if self.default_constructor is None:
entry = self.lookup(self.name) entry = self.lookup(self.name)
if len(entry.type.base_classes) == 0: if not entry.type.base_classes:
self.default_constructor = True self.default_constructor = True
return return
for base_class in entry.type.base_classes: for base_class in entry.type.base_classes:
...@@ -2035,7 +2035,7 @@ class CppClassScope(Scope): ...@@ -2035,7 +2035,7 @@ class CppClassScope(Scope):
type = alternative.type type = alternative.type
if type.is_ptr: if type.is_ptr:
type = type.base_type type = type.base_type
if len(type.args) == 0: if not type.args:
found = True found = True
break break
if not found: if not found:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment