Fixed warning C4127: conditional expression is constant

main
Sam Lantinga 2024-01-19 06:35:02 -08:00
parent 1dbe54c4e6
commit 9fc1135e3b
4 changed files with 4 additions and 4 deletions

View File

@ -587,7 +587,7 @@ static int DSOUND_OpenDevice(SDL_AudioDevice *device)
wfmt.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT;
break;
default:
SDL_assert(0 && "Unsupported channel count!");
SDL_assert(!"Unsupported channel count!");
break;
}
} else if (SDL_AUDIO_ISFLOAT(device->spec.format)) {

View File

@ -674,7 +674,7 @@ int SDL_PlayHapticRumble(SDL_Haptic *haptic, float strength, Uint32 length)
efx->leftright.small_magnitude = efx->leftright.large_magnitude = magnitude;
efx->leftright.length = length;
} else {
SDL_assert(0 && "This should have been caught elsewhere");
SDL_assert(!"This should have been caught elsewhere");
}
if (SDL_UpdateHapticEffect(haptic, haptic->rumble_id, &haptic->rumble_effect) < 0) {

View File

@ -1035,7 +1035,7 @@ int SDL_GetRenderOutputSize(SDL_Renderer *renderer, int *w, int *h)
} else if (renderer->window) {
return SDL_GetWindowSizeInPixels(renderer->window, w, h);
} else {
SDL_assert(0 && "This should never happen");
SDL_assert(!"This should never happen");
return SDL_SetError("Renderer doesn't support querying output size");
}
}

View File

@ -94,7 +94,7 @@ SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
break;
default:
SDL_assert(0 && "We should never get here (caught above)");
SDL_assert(!"We should never get here (caught above)");
break;
}