Christoph Mallon: Replace strlen(x) == 0 (O(n)) by x[0] == '\0' (O(1)).

This commit is contained in:
Sam Lantinga 2013-08-29 08:30:21 -07:00
parent 62d7359fd5
commit c6b7c0f507
12 changed files with 43 additions and 43 deletions

View file

@ -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;