mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-10-01 13:27:18 -05:00
Fixing deprecation warnings
This commit is contained in:
@@ -98,7 +98,7 @@ class LinkGPIO {
|
||||
}
|
||||
|
||||
private:
|
||||
int getBit(volatile u16 reg, int bit) { return (reg >> bit) & 1; }
|
||||
int getBit(u16 reg, int bit) { return (reg >> bit) & 1; }
|
||||
|
||||
void setBit(volatile u16& reg, int bit, bool data) {
|
||||
if (data)
|
||||
|
||||
@@ -273,6 +273,8 @@ class LinkUniversal {
|
||||
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -526,6 +528,8 @@ class LinkUniversal {
|
||||
// (should not happen)
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -594,6 +598,8 @@ class LinkUniversal {
|
||||
setMode(LINK_WIRELESS);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,6 +626,8 @@ class LinkUniversal {
|
||||
setMode(LINK_WIRELESS);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1433,9 +1433,9 @@ class LinkWireless {
|
||||
|
||||
u32 min = 0xffffffff;
|
||||
for (int i = 0; i < config.maxPlayers - 1; i++) {
|
||||
u32 confirmationData = sessionState.lastConfirmationFromClients[1 + i];
|
||||
if (confirmationData > 0 && confirmationData < min)
|
||||
min = confirmationData;
|
||||
u32 _confirmationData = sessionState.lastConfirmationFromClients[1 + i];
|
||||
if (_confirmationData > 0 && _confirmationData < min)
|
||||
min = _confirmationData;
|
||||
}
|
||||
if (min < 0xffffffff)
|
||||
removeConfirmedMessages(min);
|
||||
@@ -1850,6 +1850,8 @@ class LinkWireless {
|
||||
receiveAsyncCommandResponseOrFinish();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ class Queue {
|
||||
|
||||
rear = (rear + 1) % Size;
|
||||
arr[rear] = item;
|
||||
count++;
|
||||
count = count + 1;
|
||||
}
|
||||
|
||||
T pop() {
|
||||
@@ -170,7 +170,7 @@ class Queue {
|
||||
|
||||
auto x = arr[front];
|
||||
front = (front + 1) % Size;
|
||||
count--;
|
||||
count = count - 1;
|
||||
|
||||
return x;
|
||||
}
|
||||
@@ -199,7 +199,8 @@ class Queue {
|
||||
}
|
||||
|
||||
void clear() {
|
||||
front = count = 0;
|
||||
front = 0;
|
||||
count = 0;
|
||||
rear = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user