Christoph Mallon: Replace strlen(x) == 0 (O(n)) by x[0] == '\0' (O(1)).
This commit is contained in:
parent
62d7359fd5
commit
c6b7c0f507
12 changed files with 43 additions and 43 deletions
|
@ -137,7 +137,7 @@ WIN_HasClipboardText(_THIS)
|
|||
SDL_bool result = SDL_FALSE;
|
||||
char *text = WIN_GetClipboardText(_this);
|
||||
if (text) {
|
||||
result = (SDL_strlen(text)>0) ? SDL_TRUE : SDL_FALSE;
|
||||
result = text[0] != '\0' ? SDL_TRUE : SDL_FALSE;
|
||||
SDL_free(text);
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue