summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-03-26 15:35:00 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-03-27 11:08:39 (GMT)
commitaeb5fd46c7a4427ba13d9d75947006dee5fb0a20 (patch)
treec2623edbde18ed20bde99243842dcd967023a8d9 /src
parent97a3b2d04dbfd9c56f1181b5f45864bcb1472099 (diff)
downloadQt-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')
-rw-r--r--src/corelib/kernel/qtranslator.cpp2
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)