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
|
@ -331,7 +331,7 @@ int main(int argc, char *argv[]) {
|
|||
break;
|
||||
|
||||
case SDL_TEXTINPUT:
|
||||
if (SDL_strlen(event.text.text) == 0 || event.text.text[0] == '\n' ||
|
||||
if (event.text.text[0] == '\0' || event.text.text[0] == '\n' ||
|
||||
markedRect.w < 0)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue