Skip to content

Commit 071752a

Browse files
committed
Remove redundant cast in TIMER6 IRQ handler
Replace static_cast<uint32_t>(~kIntFlag) with ~kIntFlag in TIMER6_IRQHandler. This removes an unnecessary explicit cast when writing the interrupt-clear value to TIMER_INTF, keeping behavior the same and avoiding potential compiler warnings about redundant conversions.
1 parent 0afa0bd commit 071752a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib-gd32/src/timer6.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void TIMER6_IRQHandler() {
4141
gv_seconds.uptime = gv_seconds.uptime + 1;
4242
}
4343

44-
TIMER_INTF(TIMER6) = static_cast<uint32_t>(~kIntFlag);
44+
TIMER_INTF(TIMER6) = ~kIntFlag;
4545
}
4646
#endif
4747
}

0 commit comments

Comments
 (0)