silence clang-tidy warning

This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-05-19 00:04:11 -07:00
parent 029b157540
commit d9e3bd3248

View File

@ -181,6 +181,7 @@ PYBIND11_NAMESPACE_BEGIN(detail)
template <typename T, typename SFINAE>
struct compare_buffer_info {
static bool compare(const buffer_info &b) {
// NOLINTNEXTLINE(bugprone-sizeof-expression) Needed for `PyObject *`
return b.format == format_descriptor<T>::format() && b.itemsize == (ssize_t) sizeof(T);
}
};