hunspell / hunspell

The most popular spellchecking library.

Home Page:http://hunspell.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

don't use strlen to check if a string is of length 0

w1wwwwww opened this issue · comments

from an email from mark stankus,

Trivial improvement to performance:

file:nsMsgFolderCache.cpp sspitzer 1.25 lines:  (sept 7, 2000 11:15 pm)
387                     if (nsCRT::strlen(pathKey) == 0) {
388                             return NS_ERROR_FAILURE;
389                     }

slightly more efficient:

387                     if (*pathKey=='\0') {
388                             return NS_ERROR_FAILURE;
389                     }

logging a bug about this so I remember to check the rest of the code
for stuff like this.

thanks mark.

From bug 58221 in Mozilla.