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

@ -65,7 +65,7 @@ SDL_HasClipboardText(void)
if (_this->HasClipboardText) {
return _this->HasClipboardText(_this);
} else {
if ((_this->clipboard_text) && (SDL_strlen(_this->clipboard_text)>0)) {
if (_this->clipboard_text && _this->clipboard_text[0] != '\0') {
return SDL_TRUE;
} else {
return SDL_FALSE;