]> granicus.if.org Git - graphviz/commitdiff
GDI+ plugin: [nfc] remove legacy use of a C-style cast
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 27 Nov 2021 01:27:11 +0000 (17:27 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 4 Dec 2021 02:56:39 +0000 (18:56 -0800)
plugin/gdiplus/gvloadimage_gdiplus.cpp

index 5e65a42258297a9a9de259ad78cd29b1da28b7d1..e7a56d787cb5bf21c6835b0be1379bd902a7ea44 100644 (file)
@@ -24,9 +24,8 @@
 
 using namespace Gdiplus;
 
-static void gdiplus_freeimage(usershape_t *us)
-{
-       delete (Image*)us->data;
+static void gdiplus_freeimage(usershape_t *us) {
+  delete reinterpret_cast<Image*>(us->data);
 }
 
 static Image* gdiplus_loadimage(GVJ_t * job, usershape_t *us)