mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
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:
@@ -125,5 +125,7 @@ TEST_SUBMODULE(stl_binders, m) {
|
||||
PYBIND11_NUMPY_DTYPE(VStruct, w, x, y, z);
|
||||
py::class_<VStruct>(m, "VStruct").def_readwrite("x", &VStruct::x);
|
||||
py::bind_vector<std::vector<VStruct>>(m, "VectorStruct", py::buffer_protocol());
|
||||
m.def("get_vectorstruct", [] {return std::vector<VStruct> {{0, 5, 3.0, 1}, {1, 30, -1e4, 0}};});
|
||||
m.def("get_vectorstruct", [] {
|
||||
return std::vector<VStruct>{{false, 5, 3.0, true}, {true, 30, -1e4, false}};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user