Fix missing return true and other errors

This commit is contained in:
Rodrigo Alfonso 2025-01-14 11:50:57 -03:00
parent b2e518cf3d
commit b5885f39cb
2 changed files with 9 additions and 8 deletions

View File

@ -256,6 +256,7 @@ class LinkCable {
return false;
_state.outgoingMessages.syncPush(data);
return true;
}
/**
@ -266,16 +267,16 @@ class LinkCable {
* \warning The flag is cleared on each call.
*/
[[nodiscard]] bool didReceiveQueueOverflow() {
bool overflow = false;
bool flag = false;
for (u32 i = 0; i < LINK_CABLE_MAX_PLAYERS; i++) {
overflow = overflow || _state.newMessages[i].overflow ||
_state.readyToSyncMessages[i].overflow;
flag = flag || _state.newMessages[i].overflow ||
_state.readyToSyncMessages[i].overflow;
_state.newMessages[i].overflow = false;
state.syncedIncomingMessages[i].overflow = false;
}
return overflow;
return flag;
}
/**

View File

@ -368,15 +368,15 @@ class LinkUniversal {
* \warning The flag is cleared on each call.
*/
[[nodiscard]] bool didReceiveQueueOverflow() {
bool overflow = mode == LINK_CABLE ? linkCable.didReceiveQueueOverflow()
: linkWireless.didReceiveQueueOverflow();
bool flag = mode == LINK_CABLE ? linkCable.didReceiveQueueOverflow()
: linkWireless.didReceiveQueueOverflow();
for (u32 i = 0; i < LINK_UNIVERSAL_MAX_PLAYERS; i++) {
overflow = overflow || incomingMessages[i].overflow;
flag = flag || incomingMessages[i].overflow;
incomingMessages[i].overflow = false;
}
return overflow;
return flag;
}
/**