From: Vladimír Vondruš Date: Mon, 8 Jun 2020 22:09:50 +0000 (+0200) Subject: documentation/doxygen: don't set is_final=False for non-classes. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=3faf538b20dcffc3ea645e459c3f9445f129a051;p=blog.git documentation/doxygen: don't set is_final=False for non-classes. --- diff --git a/documentation/doxygen.py b/documentation/doxygen.py index cde5914a..21b8ee32 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -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.