1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Revise inline keyword usage

And let compiler decide whether to inline functions.
This commit is contained in:
Chocobo1 2019-07-14 17:26:56 +08:00
parent f6f8aaf3db
commit 7a5e883cd2
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
3 changed files with 7 additions and 5 deletions

View File

@ -112,3 +112,8 @@ QString Profile::fromPortablePath(const QString &portablePath) const
{ {
return m_pathConverterImpl->fromPortablePath(portablePath); return m_pathConverterImpl->fromPortablePath(portablePath);
} }
QString specialFolderLocation(const SpecialFolder folder)
{
return Profile::instance().location(folder);
}

View File

@ -83,9 +83,6 @@ private:
static Profile *m_instance; static Profile *m_instance;
}; };
inline QString specialFolderLocation(SpecialFolder folder) QString specialFolderLocation(SpecialFolder folder);
{
return Profile::instance().location(folder);
}
#endif // QBT_PROFILE_H #endif // QBT_PROFILE_H

View File

@ -88,7 +88,7 @@ namespace
return ret; return ret;
} }
inline QUrl urlFromHostHeader(const QString &hostHeader) QUrl urlFromHostHeader(const QString &hostHeader)
{ {
if (!hostHeader.contains(QLatin1String("://"))) if (!hostHeader.contains(QLatin1String("://")))
return {QLatin1String("http://") + hostHeader}; return {QLatin1String("http://") + hostHeader};