mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-21 20:55:11 +00:00
Manually applying two clang-format changes that need fix-ups for clang-tidy. (#3705)
This commit is contained in:
parent
7769e7719c
commit
abc38690dc
@ -1516,8 +1516,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||
template <typename T> operator T *() const {
|
||||
template <typename T>
|
||||
operator T *() const { // NOLINT(google-explicit-constructor)
|
||||
return get_pointer<T>();
|
||||
}
|
||||
|
||||
|
@ -400,10 +400,11 @@ TEST_SUBMODULE(stl, m) {
|
||||
m.def("half_or_none_refsensitive", [](int x) -> refsensitive_opt_int {
|
||||
return x != 0 ? refsensitive_opt_int(x / 2) : refsensitive_opt_int();
|
||||
});
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
m.def("test_nullopt_refsensitive", [](refsensitive_opt_int x) {
|
||||
return x ? x.value() : 42;
|
||||
}, py::arg_v("x", refsensitive_opt_int(), "None"));
|
||||
m.def(
|
||||
"test_nullopt_refsensitive",
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
[](refsensitive_opt_int x) { return x ? x.value() : 42; },
|
||||
py::arg_v("x", refsensitive_opt_int(), "None"));
|
||||
m.def("test_no_assign_refsensitive", [](const refsensitive_opt_no_assign &x) {
|
||||
return x ? x->value : 42;
|
||||
}, py::arg_v("x", refsensitive_opt_no_assign(), "None"));
|
||||
|
Loading…
Reference in New Issue
Block a user