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

@@ -294,12 +294,7 @@ template<> struct hash<Utils::FilePath>
{
using argument_type = Utils::FilePath;
using result_type = size_t;
result_type operator()(const argument_type &fn) const
{
if (Utils::HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive)
return hash<string>()(fn.toString().toUpper().toStdString());
return hash<string>()(fn.toString().toStdString());
}
result_type operator()(const argument_type &fn) const;
};
} // namespace std