Manually applying two clang-format changes that need fix-ups for clang-tidy. (#3705)

This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-02-09 06:32:41 -08:00 committed by GitHub
parent 7769e7719c
commit abc38690dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -1516,8 +1516,8 @@ public:
} }
} }
// NOLINTNEXTLINE(google-explicit-constructor) template <typename T>
template <typename T> operator T *() const { operator T *() const { // NOLINT(google-explicit-constructor)
return get_pointer<T>(); return get_pointer<T>();
} }

View File

@ -400,10 +400,11 @@ TEST_SUBMODULE(stl, m) {
m.def("half_or_none_refsensitive", [](int x) -> refsensitive_opt_int { m.def("half_or_none_refsensitive", [](int x) -> refsensitive_opt_int {
return x != 0 ? refsensitive_opt_int(x / 2) : refsensitive_opt_int(); return x != 0 ? refsensitive_opt_int(x / 2) : refsensitive_opt_int();
}); });
m.def(
"test_nullopt_refsensitive",
// NOLINTNEXTLINE(performance-unnecessary-value-param) // NOLINTNEXTLINE(performance-unnecessary-value-param)
m.def("test_nullopt_refsensitive", [](refsensitive_opt_int x) { [](refsensitive_opt_int x) { return x ? x.value() : 42; },
return x ? x.value() : 42; py::arg_v("x", refsensitive_opt_int(), "None"));
}, py::arg_v("x", refsensitive_opt_int(), "None"));
m.def("test_no_assign_refsensitive", [](const refsensitive_opt_no_assign &x) { m.def("test_no_assign_refsensitive", [](const refsensitive_opt_no_assign &x) {
return x ? x->value : 42; return x ? x->value : 42;
}, py::arg_v("x", refsensitive_opt_no_assign(), "None")); }, py::arg_v("x", refsensitive_opt_no_assign(), "None"));