8000 Add explicit casts in some headers. · matplotlib/matplotlib@881f2a6 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 881f2a6

Browse files
committed
Add explicit casts in some headers.
This prevents a bunch of repeated warnings since these headers are included multiple times.
1 parent 429ffce commit 881f2a6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/_backend_agg_basic_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class GCAgg
115115

116116
bool has_hatchpath()
117117
{
118-
return hatchpath.total_vertices();
118+
return hatchpath.total_vertices() != 0;
119119
}
120120

121121
private:

src/file_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static NPY_INLINE FILE *mpl_PyFile_Dup(PyObject *file, char *mode, mpl_off_t *or
8282
if (ret == NULL) {
8383
return NULL;
8484
}
85-
fd2 = PyNumber_AsSsize_t(ret, NULL);
85+
fd2 = (int)PyNumber_AsSsize_t(ret, NULL);
8686
Py_DECREF(ret);
8787

8888
/* Convert to FILE* handle */

src/mplutils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ extern "C" int add_dict_int(PyObject *dict, const char *key, long val);
6363

6464
#if defined(_MSC_VER) && (_MSC_VER < 1800)
6565
namespace std {
66-
inline bool isfinite(double num) { return _finite(num); }
66+
inline bool isfinite(double num) { return _finite(num) != 0; }
6767
}
6868
#endif
6969

0 commit comments

Comments
 (0)
0