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

@@ -62,7 +62,7 @@ TEST_SUBMODULE(numpy_vectorize, m) {
// test_method_vectorization
struct VectorizeTestClass {
VectorizeTestClass(int v) : value{v} {};
float method(int x, float y) { return y + (float) (x + value); }
float method(int x, float y) const { return y + (float) (x + value); }
int value = 0;
};
py::class_<VectorizeTestClass> vtc(m, "VectorizeTestClass");