diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-03-26 15:35:00 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-03-27 11:08:39 (GMT) |
commit | aeb5fd46c7a4427ba13d9d75947006dee5fb0a20 (patch) | |
tree | c2623edbde18ed20bde99243842dcd967023a8d9 /src/corelib | |
parent | 97a3b2d04dbfd9c56f1181b5f45864bcb1472099 (diff) | |
download | Qt-aeb5fd46c7a4427ba13d9d75947006dee5fb0a20.zip Qt-aeb5fd46c7a4427ba13d9d75947006dee5fb0a20.tar.gz Qt-aeb5fd46c7a4427ba13d9d75947006dee5fb0a20.tar.bz2 |
optimize
the exact length of the template is known, so there is no point in using
the more complex (and thus potentially slower) strncmp instead of memcmp.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 1eca817..77d6599 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -95,7 +95,7 @@ static bool match(const uchar* found, const char* target, uint len) // (normalize it to be without the zero-terminating symbol) if (len > 0 && found[len-1] == '\0') --len; - return (qstrncmp((const char *)found, target, len) == 0 && target[len] == '\0'); + return (memcmp(found, target, len) == 0 && target[len] == '\0'); } static uint elfHash(const char *name) |