chiark / gitweb /
documentation/doxygen: don't set is_final=False for non-classes.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 8 Jun 2020 22:09:50 +0000 (00:09 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 8 Jun 2020 22:27:47 +0000 (00:27 +0200)
documentation/doxygen.py

index cde5914af0b09835edd5f040f1bb702a565951d4..21b8ee32d9839a18850dd6032f378d50f10cb6ab 100755 (executable)
@@ -2228,10 +2228,8 @@ def extract_metadata(state: State, xml):
             break
 
     # Final classes
-    if compound.kind in ['struct', 'class', 'union'] and compounddef.attrib.get('final') == 'yes':
-        compound.is_final = True
-    else:
-        compound.is_final = False
+    if compound.kind in ['struct', 'class', 'union']:
+        compound.is_final = compounddef.attrib.get('final') == 'yes'
 
     if compound.kind in ['class', 'struct', 'union']:
         # Fix type spacing
@@ -2542,10 +2540,8 @@ def parse_xml(state: State, xml: str):
         state.current_prefix = []
 
     # Final classes
-    if compound.kind in ['struct', 'class', 'union'] and compounddef.attrib.get('final') == 'yes':
-        compound.is_final = True
-    else:
-        compound.is_final = False
+    if compound.kind in ['struct', 'class', 'union']:
+        compound.is_final = compounddef.attrib.get('final') == 'yes'
 
     # Decide about the include file for this compound. Classes get it always,
     # namespaces without any members too.