summaryrefslogtreecommitdiff
path: root/src/c_fl_surface_device.cpp
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-16 14:21:05 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-16 14:21:05 +1300
commitdbf6f4db24aee7315b2782a87e127367887e2036 (patch)
tree91f5af52dbdf6be9e1f5026bcf354a6455dd411d /src/c_fl_surface_device.cpp
parentba1719013e5bab82a2accb4aadfd8451c3ebc931 (diff)
Changed reinterpret_cast to static_cast where applicable
Diffstat (limited to 'src/c_fl_surface_device.cpp')
-rw-r--r--src/c_fl_surface_device.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/c_fl_surface_device.cpp b/src/c_fl_surface_device.cpp
index 50088cf..9836a04 100644
--- a/src/c_fl_surface_device.cpp
+++ b/src/c_fl_surface_device.cpp
@@ -24,12 +24,12 @@ public:
// Flattened C API
SURFACEDEVICE new_fl_surface_device(void * g) {
- My_Surface_Device *s = new My_Surface_Device(reinterpret_cast<Fl_Graphics_Driver*>(g));
+ My_Surface_Device *s = new My_Surface_Device(static_cast<Fl_Graphics_Driver*>(g));
return s;
}
void free_fl_surface_device(SURFACEDEVICE s) {
- delete reinterpret_cast<My_Surface_Device*>(s);
+ delete static_cast<My_Surface_Device*>(s);
}
@@ -37,7 +37,7 @@ void free_fl_surface_device(SURFACEDEVICE s) {
void fl_surface_device_set_current(SURFACEDEVICE s) {
// virtual so disable dispatch
- reinterpret_cast<Fl_Surface_Device*>(s)->Fl_Surface_Device::set_current();
+ static_cast<Fl_Surface_Device*>(s)->Fl_Surface_Device::set_current();
}
SURFACEDEVICE fl_surface_device_get_surface(void) {
@@ -48,11 +48,11 @@ SURFACEDEVICE fl_surface_device_get_surface(void) {
void * fl_surface_device_get_driver(SURFACEDEVICE s) {
- return reinterpret_cast<Fl_Surface_Device*>(s)->driver();
+ return static_cast<Fl_Surface_Device*>(s)->driver();
}
void fl_surface_device_set_driver(SURFACEDEVICE s, void * g) {
- reinterpret_cast<Fl_Surface_Device*>(s)->driver(reinterpret_cast<Fl_Graphics_Driver*>(g));
+ static_cast<Fl_Surface_Device*>(s)->driver(static_cast<Fl_Graphics_Driver*>(g));
}