From 83065600fb1fff800ff4ac92d9ccaf29d0f82077 Mon Sep 17 00:00:00 2001 From: gyy Date: Tue, 24 Sep 2024 16:02:16 -0400 Subject: [PATCH] Remove the condition on res --- NODROP/scripts/mkfig/matplotlibcpp.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/NODROP/scripts/mkfig/matplotlibcpp.h b/NODROP/scripts/mkfig/matplotlibcpp.h index 78b59c0..f1056a1 100644 --- a/NODROP/scripts/mkfig/matplotlibcpp.h +++ b/NODROP/scripts/mkfig/matplotlibcpp.h @@ -580,7 +580,7 @@ void plot_surface(const std::vector<::std::vector> &x, Py_DECREF(axis); Py_DECREF(args); Py_DECREF(kwargs); - if (res) Py_DECREF(res); + Py_DECREF(res); } template @@ -622,7 +622,7 @@ void contour(const std::vector<::std::vector> &x, Py_DECREF(args); Py_DECREF(kwargs); - if (res) Py_DECREF(res); + Py_DECREF(res); } template @@ -748,7 +748,7 @@ void plot3(const std::vector &x, Py_DECREF(axis); Py_DECREF(args); Py_DECREF(kwargs); - if (res) Py_DECREF(res); + Py_DECREF(res); } template @@ -1152,7 +1152,7 @@ bool scatter(const std::vector& x, Py_DECREF(args); Py_DECREF(kwargs); Py_DECREF(fig); - if (res) Py_DECREF(res); + Py_DECREF(res); return res; } @@ -1528,8 +1528,7 @@ bool quiver(const std::vector& x, const std::vector& y, cons Py_DECREF(axis); Py_DECREF(kwargs); Py_DECREF(plot_args); - if (res) - Py_DECREF(res); + Py_DECREF(res); return res; } @@ -2519,7 +2518,7 @@ inline void set_zlabel(const std::string &str, const std::map