mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-01 12:07:31 +01:00
Fix volatile ++/-- and anonymous enum arithmetic
Avoids the C++20 deprecation warnings (-Wdeprecated-volatile and -Wdeprecated-anon-enum-enum-conversion). No behaviour change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
302e408069
commit
cbdc38f68f
5 files changed
+8
-7
No files matched your search
+4
-3
@@ -168,11 +168,12 @@ void InitInstanceCounter() {
|
||||
// so next keeps climbing across runs and eventually wraps this uint8_t. ID 0 is not a
|
||||
// valid instance - it fails the IsFirstInstance() check, which quietly disables config
|
||||
// saving - so skip past it.
|
||||
if (++buf->next == 0) {
|
||||
buf->next = (uint8_t)(buf->next + 1);
|
||||
if (buf->next == 0) {
|
||||
buf->next = 1;
|
||||
}
|
||||
PPSSPP_ID = buf->next;
|
||||
buf->total++;
|
||||
buf->total = (uint8_t)(buf->total + 1);
|
||||
});
|
||||
if (!success) {
|
||||
PPSSPP_ID = 1;
|
||||
@@ -181,7 +182,7 @@ void InitInstanceCounter() {
|
||||
|
||||
void ShutdownInstanceCounter() {
|
||||
UpdateInstanceCounter([](volatile InstanceInfo *buf) {
|
||||
buf->total--;
|
||||
buf->total = (uint8_t)(buf->total - 1);
|
||||
});
|
||||
|
||||
#if PPSSPP_PLATFORM(WINDOWS)
|
||||
|
||||
Reference in new issue
Block a user