Skip to content

Commit 8bcab79

Browse files
committed
Fix clang-tidy warning, compare pointer to nullptr
1 parent c3dd9ac commit 8bcab79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_embed/test_interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ bool has_state_dict_internals_obj() {
262262

263263
bool has_pybind11_internals_static() {
264264
auto *&ipp = py::detail::get_internals_pp();
265-
return ipp && (*ipp != nullptr);
265+
return (ipp != nullptr) && *ipp;
266266
}
267267

268268
TEST_CASE("Restart the interpreter") {

0 commit comments

Comments
 (0)