mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 13:55:36 +00:00
remove a few stale NULL message/title checks after commit e2b729b1756a
top-level guarantees non-NULL message / title passed in messageboxdata
This commit is contained in:
parent
f1cab8aea6
commit
5c212cb0c5
|
@ -154,9 +154,9 @@ class HAIKU_SDL_MessageBox : public BAlert
|
|||
ApplyAndParseColorScheme(aMessageBoxData->colorScheme);
|
||||
}
|
||||
|
||||
(aMessageBoxData->title && aMessageBoxData->title[0]) ?
|
||||
(aMessageBoxData->title[0]) ?
|
||||
SetTitle(aMessageBoxData->title) : SetTitle(HAIKU_SDL_DefTitle);
|
||||
(aMessageBoxData->message && aMessageBoxData->message[0]) ?
|
||||
(aMessageBoxData->message[0]) ?
|
||||
SetMessageText(aMessageBoxData->message) : SetMessageText(HAIKU_SDL_DefMessage);
|
||||
|
||||
SetType(ConvertMessageBoxType(static_cast<SDL_MessageBoxFlags>(aMessageBoxData->flags)));
|
||||
|
|
|
@ -314,7 +314,7 @@ static SDL_bool AddDialogControl(WIN_DialogData *dialog, WORD type, DWORD style,
|
|||
if (!AddDialogData(dialog, &type, sizeof(type))) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
if (type == DLGITEMTYPEBUTTON || (type == DLGITEMTYPESTATIC && caption != NULL && caption[0])) {
|
||||
if (type == DLGITEMTYPEBUTTON || (type == DLGITEMTYPESTATIC && caption[0])) {
|
||||
if (!AddDialogString(dialog, caption)) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ X11_MessageBoxInitPositions( SDL_MessageBoxDataX11 *data )
|
|||
const SDL_MessageBoxData *messageboxdata = data->messageboxdata;
|
||||
|
||||
/* Go over text and break linefeeds into separate lines. */
|
||||
if ( messageboxdata->message && messageboxdata->message[ 0 ] ) {
|
||||
if ( messageboxdata->message[0] ) {
|
||||
const char *text = messageboxdata->message;
|
||||
const int linecount = CountLinesOfText(text);
|
||||
TextLineData *plinedata = (TextLineData *) SDL_malloc(sizeof (TextLineData) * linecount);
|
||||
|
|
Loading…
Reference in a new issue