From dbf6f4db24aee7315b2782a87e127367887e2036 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Thu, 16 Jan 2025 14:21:05 +1300 Subject: Changed reinterpret_cast to static_cast where applicable --- src/c_fl_simple_counter.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/c_fl_simple_counter.cpp') diff --git a/src/c_fl_simple_counter.cpp b/src/c_fl_simple_counter.cpp index 891a371..8be586d 100644 --- a/src/c_fl_simple_counter.cpp +++ b/src/c_fl_simple_counter.cpp @@ -24,8 +24,8 @@ class My_Simple_Counter : public Fl_Simple_Counter { public: using Fl_Simple_Counter::Fl_Simple_Counter; - friend void fl_simple_counter_draw(SIMPLE_COUNTER c); - friend int fl_simple_counter_handle(SIMPLE_COUNTER c, int e); + friend void fl_simple_counter_draw(SIMPLECOUNTER c); + friend int fl_simple_counter_handle(SIMPLECOUNTER c, int e); void draw(); int handle(int e); @@ -44,24 +44,24 @@ int My_Simple_Counter::handle(int e) { // Flattened C API -SIMPLE_COUNTER new_fl_simple_counter(int x, int y, int w, int h, char* label) { +SIMPLECOUNTER new_fl_simple_counter(int x, int y, int w, int h, char* label) { My_Simple_Counter *c = new My_Simple_Counter(x, y, w, h, label); return c; } -void free_fl_simple_counter(SIMPLE_COUNTER c) { - delete reinterpret_cast(c); +void free_fl_simple_counter(SIMPLECOUNTER c) { + delete static_cast(c); } -void fl_simple_counter_draw(SIMPLE_COUNTER c) { - reinterpret_cast(c)->Fl_Simple_Counter::draw(); +void fl_simple_counter_draw(SIMPLECOUNTER c) { + static_cast(c)->Fl_Simple_Counter::draw(); } -int fl_simple_counter_handle(SIMPLE_COUNTER c, int e) { - return reinterpret_cast(c)->Fl_Simple_Counter::handle(e); +int fl_simple_counter_handle(SIMPLECOUNTER c, int e) { + return static_cast(c)->Fl_Simple_Counter::handle(e); } -- cgit