8000 Fix some compiler warnings by mdboom · Pull Request #5285 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix some compiler warnings #5285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 22, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More compiler warnings from gcc
  • Loading branch information
mdboom committed Oct 20, 2015
commit f1c9c07bfd2c41dfc59b32952a43f26954922d44
8 changes: 5 additions & 3 deletions lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,8 @@ void VoronoiDiagramGenerator::out_vertex(struct Site *v)

void VoronoiDiagramGenerator::out_site(struct Site *s)
{
if(!triangulate & plot & !debug)
if(!triangulate && plot && !debug)
circle (s->coord.x, s->coord.y, cradius);

}


Expand Down Expand Up @@ -932,7 +931,10 @@ bool VoronoiDiagramGenerator::voronoi(int triangulate)

if(!retval)
return false;


newintstar.x = 0;
newintstar.y = 0;

newsite = nextone();
while(1)
{
Expand Down
8 changes: 4 additions & 4 deletions src/_path_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static PyObject *Py_points_in_path(PyObject *self, PyObject *args, PyObject *kwd
return NULL;
}

npy_intp dims[] = { points.size() };
npy_intp dims[] = { (npy_intp)points.size() };
numpy::array_view<bool, 1> results(dims);

CALL_CPP("points_in_path", (points_in_path(points, r, path, trans, results)));
Expand Down Expand Up @@ -138,7 +138,7 @@ static PyObject *Py_points_on_path(PyObject *self, PyObject *args, PyObject *kwd
return NULL;
}

npy_intp dims[] = { points.size() };
npy_intp dims[] = { (npy_intp)points.size() };
numpy::array_view<bool, 1> results(dims);

CALL_CPP("points_on_path", (points_on_path(points, r, path, trans, results)));
Expand Down Expand Up @@ -437,15 +437,15 @@ static PyObject *Py_affine_transform(PyObject *self, PyObject *args, PyObject *k

try {
numpy::array_view<double, 2> vertices(vertices_obj);
npy_intp dims[] = { vertices.size(), 2 };
npy_intp dims[] = { (npy_intp)vertices.size(), 2 };
numpy::array_view<double, 2> result(dims);
CALL_CPP("affine_transform", (affine_transform_2d(vertices, trans, result)));
return result.pyobj();
} catch (py::exception) {
PyErr_Clear();
try {
numpy::array_view<double, 1> vertices(vertices_obj);
npy_intp dims[] = { vertices.size() };
npy_intp dims[] = { (npy_intp)vertices.size() };
numpy::array_view<double, 1> result(dims);
CALL_CPP("affine_transform", (affine_transform_1d(vertices, trans, result)));
return result.pyobj();
Expand Down
0