Use new parameter validation macro

This commit is contained in:
Sam Lantinga
2025-09-16 21:51:03 -07:00
parent ee1c90a358
commit 25b2d2c821
60 changed files with 1113 additions and 1133 deletions

View File

@@ -31,19 +31,23 @@ bool SDL_GetSpanEnclosingRect(int width, int height,
int span_y1, span_y2;
int rect_y1, rect_y2;
if (width < 1) {
CHECK_PARAM(width < 1) {
SDL_InvalidParamError("width");
return false;
} else if (height < 1) {
}
CHECK_PARAM(height < 1) {
SDL_InvalidParamError("height");
return false;
} else if (!rects) {
}
CHECK_PARAM(!rects) {
SDL_InvalidParamError("rects");
return false;
} else if (!span) {
}
CHECK_PARAM(!span) {
SDL_InvalidParamError("span");
return false;
} else if (numrects < 1) {
}
CHECK_PARAM(numrects < 1) {
SDL_InvalidParamError("numrects");
return false;
}