add nodiscard to features2d clone funcs

This commit is contained in:
Dale Phurrough
2021-09-09 15:20:45 +02:00
parent 1e0d290f2e
commit 068f33cfdf
2 changed files with 16 additions and 9 deletions
+12 -5
View File
@@ -432,11 +432,18 @@ class CppHeaderParser(object):
# filter off some common prefixes, which are meaningless for Python wrappers.
# note that we do not strip "static" prefix, which does matter;
# it means class methods, not instance methods
decl_str = self.batch_replace(decl_str, [("static inline", ""), ("inline", ""), ("explicit ", ""),
("CV_EXPORTS_W", ""), ("CV_EXPORTS", ""), ("CV_CDECL", ""),
("CV_WRAP ", " "), ("CV_INLINE", ""),
("CV_DEPRECATED", ""), ("CV_DEPRECATED_EXTERNAL", "")]).strip()
decl_str = self.batch_replace(decl_str, [("static inline", ""),
("inline", ""),
("explicit ", ""),
("CV_EXPORTS_W", ""),
("CV_EXPORTS", ""),
("CV_CDECL", ""),
("CV_WRAP ", " "),
("CV_INLINE", ""),
("CV_DEPRECATED", ""),
("CV_DEPRECATED_EXTERNAL", ""),
("CV_NODISCARD_STD", ""),
("CV_NODISCARD", "")]).strip()
if decl_str.strip().startswith('virtual'):
virtual_method = True