Utils: Move std::hash<Utils::FilePath>::operator() out of line

This generates quite a bit of code, and the non-inlined call
should not be noticible given the rest.

Change-Id: If3a699737142c2953dd0977df850b07bc529a124
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2019-12-17 14:18:14 +01:00
parent e109b731ad
commit 8683ec6a29
2 changed files with 9 additions and 6 deletions

View File

@@ -994,3 +994,11 @@ void withNtfsPermissions(const std::function<void()> &task)
}
#endif
} // namespace Utils
std::hash<Utils::FilePath>::result_type
std::hash<Utils::FilePath>::operator()(const std::hash<Utils::FilePath>::argument_type &fn) const
{
if (Utils::HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive)
return hash<string>()(fn.toString().toUpper().toStdString());
return hash<string>()(fn.toString().toStdString());
}