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_clock_output.cpp | |
parent | ba1719013e5bab82a2accb4aadfd8451c3ebc931 (diff) |
Changed reinterpret_cast to static_cast where applicable
Diffstat (limited to 'src/c_fl_clock_output.cpp')
-rw-r--r-- | src/c_fl_clock_output.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/c_fl_clock_output.cpp b/src/c_fl_clock_output.cpp index 91aaae4..a34b1c4 100644 --- a/src/c_fl_clock_output.cpp +++ b/src/c_fl_clock_output.cpp @@ -35,8 +35,8 @@ class My_Clock_Output : public Fl_Clock_Output { public: using Fl_Clock_Output::Fl_Clock_Output; - friend void fl_clock_output_draw(CLOCK_OUTPUT c); - friend int fl_clock_output_handle(CLOCK_OUTPUT c, int e); + friend void fl_clock_output_draw(CLOCKOUTPUT c); + friend int fl_clock_output_handle(CLOCKOUTPUT c, int e); void draw(); int handle(int e); @@ -55,57 +55,57 @@ int My_Clock_Output::handle(int e) { // Flattened C API -CLOCK_OUTPUT new_fl_clock_output(int x, int y, int w, int h, char* label) { +CLOCKOUTPUT new_fl_clock_output(int x, int y, int w, int h, char* label) { My_Clock_Output *c = new My_Clock_Output(x, y, w, h, label); return c; } -void free_fl_clock_output(CLOCK_OUTPUT c) { - delete reinterpret_cast<My_Clock_Output*>(c); +void free_fl_clock_output(CLOCKOUTPUT c) { + delete static_cast<My_Clock_Output*>(c); } -int fl_clock_output_get_hour(CLOCK_OUTPUT c) { - return reinterpret_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::hour(); +int fl_clock_output_get_hour(CLOCKOUTPUT c) { + return static_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::hour(); } -int fl_clock_output_get_minute(CLOCK_OUTPUT c) { - return reinterpret_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::minute(); +int fl_clock_output_get_minute(CLOCKOUTPUT c) { + return static_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::minute(); } -int fl_clock_output_get_second(CLOCK_OUTPUT c) { - return reinterpret_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::second(); +int fl_clock_output_get_second(CLOCKOUTPUT c) { + return static_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::second(); } -unsigned long fl_clock_output_get_value(CLOCK_OUTPUT c) { - return reinterpret_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::value(); +unsigned long fl_clock_output_get_value(CLOCKOUTPUT c) { + return static_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::value(); } -void fl_clock_output_set_value(CLOCK_OUTPUT c, unsigned long v) { - reinterpret_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::value(v); +void fl_clock_output_set_value(CLOCKOUTPUT c, unsigned long v) { + static_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::value(v); } -void fl_clock_output_set_value2(CLOCK_OUTPUT c, int h, int m, int s) { - reinterpret_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::value(h,m,s); +void fl_clock_output_set_value2(CLOCKOUTPUT c, int h, int m, int s) { + static_cast<Fl_Clock_Output*>(c)->Fl_Clock_Output::value(h,m,s); } -void fl_clock_output_draw(CLOCK_OUTPUT c) { - reinterpret_cast<My_Clock_Output*>(c)->Fl_Clock_Output::draw(); +void fl_clock_output_draw(CLOCKOUTPUT c) { + static_cast<My_Clock_Output*>(c)->Fl_Clock_Output::draw(); } -void fl_clock_output_draw2(CLOCK_OUTPUT c, int x, int y, int w, int h) { +void fl_clock_output_draw2(CLOCKOUTPUT c, int x, int y, int w, int h) { void (Fl_Clock_Output::*mydraw)(int,int,int,int) = &Friend_Clock_Output::draw; - (reinterpret_cast<Fl_Clock_Output*>(c)->*mydraw)(x, y, w, h); + (static_cast<Fl_Clock_Output*>(c)->*mydraw)(x, y, w, h); } -int fl_clock_output_handle(CLOCK_OUTPUT c, int e) { - return reinterpret_cast<My_Clock_Output*>(c)->Fl_Clock_Output::handle(e); +int fl_clock_output_handle(CLOCKOUTPUT c, int e) { + return static_cast<My_Clock_Output*>(c)->Fl_Clock_Output::handle(e); } |