mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
Adding .clang-tidy readability-braces-around-statements option.
clang-tidy automatic changes. NO manual changes.
This commit is contained in:
committed by
Ralf W. Grosse-Kunstleve
parent
8581584e60
commit
ddbc74c674
@@ -139,9 +139,13 @@ TEST_SUBMODULE(class_, m) {
|
||||
|
||||
m.def("return_class_1", []() -> BaseClass* { return new DerivedClass1(); });
|
||||
m.def("return_class_2", []() -> BaseClass* { return new DerivedClass2(); });
|
||||
m.def("return_class_n", [](int n) -> BaseClass* {
|
||||
if (n == 1) return new DerivedClass1();
|
||||
if (n == 2) return new DerivedClass2();
|
||||
m.def("return_class_n", [](int n) -> BaseClass * {
|
||||
if (n == 1) {
|
||||
return new DerivedClass1();
|
||||
}
|
||||
if (n == 2) {
|
||||
return new DerivedClass2();
|
||||
}
|
||||
return new BaseClass();
|
||||
});
|
||||
m.def("return_none", []() -> BaseClass* { return nullptr; });
|
||||
@@ -167,8 +171,9 @@ TEST_SUBMODULE(class_, m) {
|
||||
// See https://github.com/pybind/pybind11/issues/2486
|
||||
// if (category == 2)
|
||||
// return py::type::of<int>();
|
||||
if (category == 1)
|
||||
if (category == 1) {
|
||||
return py::type::of<DerivedClass1>();
|
||||
}
|
||||
return py::type::of<Invalid>();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user