8000 _path.cpp: Add explicit narrowing casts, to avoid C++11 compiler error. · matplotlib/matplotlib@913b460 · GitHub
[go: up one dir, main page]

Skip to content

Commit 913b460

Browse files
committed
_path.cpp: Add explicit narrowing casts, to avoid C++11 compiler error.
1 parent 8b4b026 commit 913b460

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_path.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ _add_polygon(Py::List& polygons, const std::vector<double>& polygon)
13531353
{
13541354
return;
13551355
}
1356-
npy_intp polygon_dims[] = { polygon.size() / 2, 2, 0 };
1356+
npy_intp polygon_dims[] = { static_cast<npy_intp>(polygon.size() / 2), 2, 0 };
13571357
PyArrayObject* polygon_array = NULL;
13581358
polygon_array = (PyArrayObject*)PyArray_SimpleNew
13591359
(2, polygon_dims, PyArray_DOUBLE);

0 commit comments

Comments
 (0)
0