summaryrefslogtreecommitdiff
path: root/src/c_fl_simple_counter.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_simple_counter.cpp
parentba1719013e5bab82a2accb4aadfd8451c3ebc931 (diff)
Changed reinterpret_cast to static_cast where applicable
Diffstat (limited to 'src/c_fl_simple_counter.cpp')
-rw-r--r--src/c_fl_simple_counter.cpp18
1 files changed, 9 insertions, 9 deletions
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<My_Simple_Counter*>(c);
+void free_fl_simple_counter(SIMPLECOUNTER c) {
+ delete static_cast<My_Simple_Counter*>(c);
}
-void fl_simple_counter_draw(SIMPLE_COUNTER c) {
- reinterpret_cast<My_Simple_Counter*>(c)->Fl_Simple_Counter::draw();
+void fl_simple_counter_draw(SIMPLECOUNTER c) {
+ static_cast<My_Simple_Counter*>(c)->Fl_Simple_Counter::draw();
}
-int fl_simple_counter_handle(SIMPLE_COUNTER c, int e) {
- return reinterpret_cast<My_Simple_Counter*>(c)->Fl_Simple_Counter::handle(e);
+int fl_simple_counter_handle(SIMPLECOUNTER c, int e) {
+ return static_cast<My_Simple_Counter*>(c)->Fl_Simple_Counter::handle(e);
}