diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-16 14:21:05 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-16 14:21:05 +1300 |
commit | dbf6f4db24aee7315b2782a87e127367887e2036 (patch) | |
tree | 91f5af52dbdf6be9e1f5026bcf354a6455dd411d /src/c_fl_paged_device.cpp | |
parent | ba1719013e5bab82a2accb4aadfd8451c3ebc931 (diff) |
Changed reinterpret_cast to static_cast where applicable
Diffstat (limited to 'src/c_fl_paged_device.cpp')
-rw-r--r-- | src/c_fl_paged_device.cpp | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/src/c_fl_paged_device.cpp b/src/c_fl_paged_device.cpp index 2d3e788..f8f7d60 100644 --- a/src/c_fl_paged_device.cpp +++ b/src/c_fl_paged_device.cpp @@ -42,7 +42,7 @@ void fl_paged_device_get_page_format(int i, const char ** n, int * w, int * h) { class My_Paged_Device : public Fl_Paged_Device { public: using Fl_Paged_Device::Fl_Paged_Device; - friend PAGED_DEVICE new_fl_paged_device(void); + friend PAGEDDEVICE new_fl_paged_device(void); }; @@ -50,104 +50,105 @@ public: // Flattened C API -PAGED_DEVICE new_fl_paged_device(void) { +PAGEDDEVICE new_fl_paged_device(void) { My_Paged_Device *p = new My_Paged_Device(); return p; } -void free_fl_paged_device(PAGED_DEVICE p) { - delete reinterpret_cast<My_Paged_Device*>(p); +void free_fl_paged_device(PAGEDDEVICE p) { + delete static_cast<My_Paged_Device*>(p); } -int fl_paged_device_start_job(PAGED_DEVICE p, int c) { +int fl_paged_device_start_job(PAGEDDEVICE p, int c) { // virtual so disable dispatch - return reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::start_job(c, 0, 0); + return static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::start_job(c, 0, 0); } -int fl_paged_device_start_job2(PAGED_DEVICE p, int c, int * f, int * t) { +int fl_paged_device_start_job2(PAGEDDEVICE p, int c, int * f, int * t) { // virtual so disable dispatch - return reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::start_job(c, f, t); + return static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::start_job(c, f, t); } -void fl_paged_device_end_job(PAGED_DEVICE p) { +void fl_paged_device_end_job(PAGEDDEVICE p) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::end_job(); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::end_job(); } -int fl_paged_device_start_page(PAGED_DEVICE p) { +int fl_paged_device_start_page(PAGEDDEVICE p) { // virtual so disable dispatch - return reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::start_page(); + return static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::start_page(); } -int fl_paged_device_end_page(PAGED_DEVICE p) { +int fl_paged_device_end_page(PAGEDDEVICE p) { // virtual so disable dispatch - return reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::end_page(); + return static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::end_page(); } -void fl_paged_device_margins(PAGED_DEVICE p, int * l, int * t, int * r, int * b) { +void fl_paged_device_margins(PAGEDDEVICE p, int * l, int * t, int * r, int * b) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::margins(l,t,r,b); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::margins(l,t,r,b); } -int fl_paged_device_printable_rect(PAGED_DEVICE p, int * w, int * h) { +int fl_paged_device_printable_rect(PAGEDDEVICE p, int * w, int * h) { // virtual so disable dispatch - return reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::printable_rect(w,h); + return static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::printable_rect(w,h); } -void fl_paged_device_get_origin(PAGED_DEVICE p, int * x, int * y) { +void fl_paged_device_get_origin(PAGEDDEVICE p, int * x, int * y) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::origin(x,y); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::origin(x,y); } -void fl_paged_device_set_origin(PAGED_DEVICE p, int x, int y) { +void fl_paged_device_set_origin(PAGEDDEVICE p, int x, int y) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::origin(x,y); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::origin(x,y); } -void fl_paged_device_rotate(PAGED_DEVICE p, float r) { +void fl_paged_device_rotate(PAGEDDEVICE p, float r) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::rotate(r); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::rotate(r); } -void fl_paged_device_scale(PAGED_DEVICE p, float x, float y) { +void fl_paged_device_scale(PAGEDDEVICE p, float x, float y) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::scale(x,y); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::scale(x,y); } -void fl_paged_device_translate(PAGED_DEVICE p, int x, int y) { +void fl_paged_device_translate(PAGEDDEVICE p, int x, int y) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::translate(x,y); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::translate(x,y); } -void fl_paged_device_untranslate(PAGED_DEVICE p) { +void fl_paged_device_untranslate(PAGEDDEVICE p) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::untranslate(); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::untranslate(); } -void fl_paged_device_print_widget(PAGED_DEVICE p, void * i, int dx, int dy) { +void fl_paged_device_print_widget(PAGEDDEVICE p, void * i, int dx, int dy) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::print_widget(reinterpret_cast<Fl_Widget*>(i),dx,dy); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::print_widget + (static_cast<Fl_Widget*>(i),dx,dy); } -void fl_paged_device_print_window(PAGED_DEVICE p, void * i, int dx, int dy) { - reinterpret_cast<Fl_Paged_Device*>(p)->print_window(reinterpret_cast<Fl_Window*>(i),dx,dy); +void fl_paged_device_print_window(PAGEDDEVICE p, void * i, int dx, int dy) { + static_cast<Fl_Paged_Device*>(p)->print_window(static_cast<Fl_Window*>(i),dx,dy); } -void fl_paged_device_print_window_part(PAGED_DEVICE p, void * i, int x, int y, +void fl_paged_device_print_window_part(PAGEDDEVICE p, void * i, int x, int y, int w, int h, int dx, int dy) { // virtual so disable dispatch - reinterpret_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::print_window_part - (reinterpret_cast<Fl_Window*>(i),x,y,w,h,dx,dy); + static_cast<Fl_Paged_Device*>(p)->Fl_Paged_Device::print_window_part + (static_cast<Fl_Window*>(i),x,y,w,h,dx,dy); } |