Skip to content

Commit 065cdad

Browse files
Try fix Wstrict-aliasing again
1 parent fb5b90a commit 065cdad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Src/HALAL/Services/Time/Scheduler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ inline void Scheduler::set_at(uint8_t idx, uint8_t id) {
4949
// sorted_task_ids_ |= ((id & 0x0F) << shift); // This is also an option in case id is incorrect, I don't think it's necessary though
5050
}
5151
inline uint8_t Scheduler::front_id() {
52-
return ((uint32_t*)(void*)&sorted_task_ids_)[0] & 0xF;
52+
return *((uint8_t*)&sorted_task_ids_) & 0xF;
5353
}
5454
inline void Scheduler::pop_front() {
5555
// O(1) remove of logical index 0

0 commit comments

Comments
 (0)