SDL_HasPrimarySelectionText: fix -Wunreachable-code-return warning.

This commit is contained in:
Ozkan Sezer 2022-09-17 00:51:00 +03:00
parent efe01faa8e
commit 5fba31f6fb
1 changed files with 5 additions and 6 deletions

View File

@ -141,13 +141,12 @@ SDL_HasPrimarySelectionText(void)
if (_this->HasPrimarySelectionText) { if (_this->HasPrimarySelectionText) {
return _this->HasPrimarySelectionText(_this); return _this->HasPrimarySelectionText(_this);
} else { }
if (_this->primary_selection_text && _this->primary_selection_text[0] != '\0') { if (_this->primary_selection_text && _this->primary_selection_text[0] != '\0') {
return SDL_TRUE; return SDL_TRUE;
} else {
return SDL_FALSE;
}
} }
return SDL_FALSE; return SDL_FALSE;
} }