diff --git a/src/code/z_lib.c b/src/code/z_lib.c index 190af64a63..a748b877f5 100644 --- a/src/code/z_lib.c +++ b/src/code/z_lib.c @@ -3,9 +3,7 @@ void Lib_MemSet(u8* dest, size_t size, u8 val) { u32 i; - // clang-format off - for (i = 0; i < size; i++) { *dest++ = val; } - // clang-format on + for (i = 0; i < size; i++, *dest++ = val) {} } f32 Math_CosS(s16 angle) { diff --git a/src/code/z_sound_source.c b/src/code/z_sound_source.c index ce54ee3939..7a5132a4e2 100644 --- a/src/code/z_sound_source.c +++ b/src/code/z_sound_source.c @@ -4,9 +4,7 @@ void SoundSource_InitAll(GlobalContext* globalCtx) { SoundSource* sources = &globalCtx->soundSources[0]; s32 i; - // clang-format off - for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); i++) { sources[i].countdown = 0; } - // clang-format on + for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); sources[i].countdown = 0, i++) {} } void SoundSource_UpdateAll(GlobalContext* globalCtx) { diff --git a/src/libultra/io/contramread.c b/src/libultra/io/contramread.c index 97d5db651c..b45c68ccbf 100644 --- a/src/libultra/io/contramread.c +++ b/src/libultra/io/contramread.c @@ -17,9 +17,7 @@ s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) { if ((__osContLastPoll != 2) || (__osPfsLastChannel != channel)) { __osContLastPoll = 2; __osPfsLastChannel = channel; - // clang-format off - for (i = 0; i < channel; i++) { *bufptr++ = 0; } - // clang-format on + for (i = 0; i < channel; i++, *bufptr++ = 0) {} gPifMempakBuf.status = 1; ((__OSContRamHeader*)bufptr)->unk_00 = 0xFF; ((__OSContRamHeader*)bufptr)->txsize = 3; diff --git a/src/libultra/io/contramwrite.c b/src/libultra/io/contramwrite.c index d8fb594e95..bdf967e2ac 100644 --- a/src/libultra/io/contramwrite.c +++ b/src/libultra/io/contramwrite.c @@ -21,9 +21,7 @@ s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 __osContLastPoll = CONT_CMD_WRITE_MEMPACK; __osPfsLastChannel = channel; - // clang-format off - for (i = 0; i < channel; i++) { *ptr++ = 0; } - // clang-format on + for (i = 0; i < channel; i++, *ptr++ = 0) {} gPifMempakBuf.status = 1; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 983c85f4bc..3ff3bc7db2 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -3762,9 +3762,7 @@ void func_8083819C(Player* this, GlobalContext* globalCtx) { void func_8083821C(Player* this) { s32 i; - // clang-format off - for (i = 0; i < PLAYER_BODYPART_MAX; i++) { this->flameTimers[i] = Rand_S16Offset(0, 200); } - // clang-format on + for (i = 0; i < PLAYER_BODYPART_MAX; this->flameTimers[i] = Rand_S16Offset(0, 200), i++) {} this->isBurning = true; }