Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
autodoxy: don't complain if the provided prototype is missing 'const'
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 1 Feb 2020 11:53:34 +0000 (12:53 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 1 Feb 2020 11:53:34 +0000 (12:53 +0100)
docs/source/_ext/autodoxy.py

index f562a23..a64800d 100644 (file)
@@ -402,8 +402,12 @@ class DoxygenMethodDocumenter(DoxygenDocumenter):
             if self.argsstring != None:
                 candidates = get_doxygen_root().xpath(xpath_query_noparam)
                 if len(candidates) == 1:
-                    logger.warning("[autodoxy] Using method '{}{}{}' instead of '{}{}{}'. You may want to drop your specification of the signature, or to fix it."
-                                   .format(obj, meth, candidates[0].find('argsstring').text, obj, meth, self.argsstring))
+                    if "{}{}{}".format(obj, meth, candidates[0].find('argsstring').text) == "{}{}{} const".format(obj, meth, self.argsstring):
+                        # ignore discrepencies due to the missing 'const' method quantifyier
+                        pass
+                    else:
+                        logger.warning("[autodoxy] Using method '{}{}{}' instead of '{}{}{}'. You may want to drop your specification of the signature, or to fix it."
+                                       .format(obj, meth, candidates[0].find('argsstring').text, obj, meth, self.argsstring))
                     self.object = candidates[0]
                     return True
                 logger.warning("[autodoxy] WARNING: Could not find method {}{}{}".format(obj, meth, self.argsstring))