aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapper.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-14 22:00:21 +0200
committerMax Kellermann <max@duempel.org>2013-10-14 22:00:21 +0200
commit6fd481df978ad4666780ef838e6c8540f6ea190f (patch)
treee437903388be90df8a92c58c05af8f4f51c7e8e1 /src/Mapper.cxx
parentb915e433911b4597626c721a8ae4a6e9dae6ac5a (diff)
downloadmpd-6fd481df978ad4666780ef838e6c8540f6ea190f.tar.gz
mpd-6fd481df978ad4666780ef838e6c8540f6ea190f.tar.xz
mpd-6fd481df978ad4666780ef838e6c8540f6ea190f.zip
Mapper, ...: use memcmp() instead of strncmp() where appropriate
Micro-optimization.
Diffstat (limited to '')
-rw-r--r--src/Mapper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx
index 7c89ba7c4..c1e508b05 100644
--- a/src/Mapper.cxx
+++ b/src/Mapper.cxx
@@ -252,7 +252,7 @@ std::string
map_fs_to_utf8(const char *path_fs)
{
if (!music_dir_fs.IsNull() &&
- strncmp(path_fs, music_dir_fs.c_str(), music_dir_fs_length) == 0 &&
+ memcmp(path_fs, music_dir_fs.data(), music_dir_fs_length) == 0 &&
G_IS_DIR_SEPARATOR(path_fs[music_dir_fs_length]))
/* remove musicDir prefix */
path_fs += music_dir_fs_length + 1;