Skip to content

Commit abc3869

Browse files
authored
Manually applying two clang-format changes that need fix-ups for clang-tidy. (#3705)
1 parent 7769e77 commit abc3869

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

include/pybind11/pytypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,8 +1516,8 @@ class capsule : public object {
15161516
}
15171517
}
15181518

1519-
// NOLINTNEXTLINE(google-explicit-constructor)
1520-
template <typename T> operator T *() const {
1519+
template <typename T>
1520+
operator T *() const { // NOLINT(google-explicit-constructor)
15211521
return get_pointer<T>();
15221522
}
15231523

tests/test_stl.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,11 @@ TEST_SUBMODULE(stl, m) {
400400
m.def("half_or_none_refsensitive", [](int x) -> refsensitive_opt_int {
401401
return x != 0 ? refsensitive_opt_int(x / 2) : refsensitive_opt_int();
402402
});
403-
// NOLINTNEXTLINE(performance-unnecessary-value-param)
404-
m.def("test_nullopt_refsensitive", [](refsensitive_opt_int x) {
405-
return x ? x.value() : 42;
406-
}, py::arg_v("x", refsensitive_opt_int(), "None"));
403+
m.def(
404+
"test_nullopt_refsensitive",
405+
// NOLINTNEXTLINE(performance-unnecessary-value-param)
406+
[](refsensitive_opt_int x) { return x ? x.value() : 42; },
407+
py::arg_v("x", refsensitive_opt_int(), "None"));
407408
m.def("test_no_assign_refsensitive", [](const refsensitive_opt_no_assign &x) {
408409
return x ? x->value : 42;
409410
}, py::arg_v("x", refsensitive_opt_no_assign(), "None"));

0 commit comments

Comments
 (0)