Mapper, ...: use memcmp() instead of strncmp() where appropriate

Micro-optimization.
This commit is contained in:
Max Kellermann
2013-10-14 22:00:21 +02:00
parent b915e43391
commit 6fd481df97
7 changed files with 11 additions and 11 deletions

View File

@@ -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;