File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -315,15 +315,19 @@ namespace matplotlibcpp {
315
315
bool operator ()(const IterableX& x, const IterableY& y, const std::string& format)
316
316
{
317
317
// It's annoying that we have to repeat the code of plot() above
318
- auto xs = std::distance (std::begin (x), std::end (x));
319
- auto ys = std::distance (std::begin (y), std::end (y));
318
+ using std::distance;
319
+ using std::begin;
320
+ using std::end;
321
+
322
+ auto xs = distance (begin (x), end (x));
323
+ auto ys = distance (begin (y), end (y));
320
324
assert (xs == ys && " x and y data must have the same number of elements!" );
321
325
322
326
PyObject* xlist = PyList_New (xs);
323
327
PyObject* ylist = PyList_New (ys);
324
328
PyObject* pystring = PyString_FromString (format.c_str ());
325
329
326
- auto itx = std:: begin (x), ity = std:: begin (y);
330
+ auto itx = begin (x), ity = begin (y);
327
331
for (size_t i = 0 ; i < xs; ++i) {
328
332
PyList_SetItem (xlist, i, PyFloat_FromDouble (*itx++));
329
333
PyList_SetItem (ylist, i, PyFloat_FromDouble (*ity++));
You can’t perform that action at this time.
0 commit comments