Skip to content

Commit 1b84188

Browse files
authored
Minor change to improve readability (#3695)
1 parent 96b943b commit 1b84188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/pybind11/detail/class.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ extern "C" inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int fla
568568
view->format = const_cast<char *>(info->format.c_str());
569569
if ((flags & PyBUF_STRIDES) == PyBUF_STRIDES) {
570570
view->ndim = (int) info->ndim;
571-
view->strides = &info->strides[0];
572-
view->shape = &info->shape[0];
571+
view->strides = info->strides.data();
572+
view->shape = info->shape.data();
573573
}
574574
Py_INCREF(view->obj);
575575
return 0;

0 commit comments

Comments
 (0)