fix(clang-tidy): clang-tidy readability and misc fixes, like adding const (#3052)

* Enable and apply clang-tidy readability and misc fixes.

* Revert deprecated tester

* add space to tests/test_constants_and_functions.cpp
This commit is contained in:
Aaron Gokaslan
2021-06-21 10:37:48 -04:00
committed by GitHub
parent d00fc62931
commit 3b30b0a51e
16 changed files with 52 additions and 33 deletions

View File

@@ -77,7 +77,7 @@ public:
TestFactory6(const TestFactory6 &f) { print_copy_created(this); value = f.value; alias = f.alias; }
virtual ~TestFactory6() { print_destroyed(this); }
virtual int get() { return value; }
bool has_alias() { return alias; }
bool has_alias() const { return alias; }
};
class PyTF6 : public TestFactory6 {
public:
@@ -102,7 +102,7 @@ public:
TestFactory7(const TestFactory7 &f) { print_copy_created(this); value = f.value; alias = f.alias; }
virtual ~TestFactory7() { print_destroyed(this); }
virtual int get() { return value; }
bool has_alias() { return alias; }
bool has_alias() const { return alias; }
};
class PyTF7 : public TestFactory7 {
public: