mirror-chatterino2/src/util/QStringHash.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
289 B
C++
Raw Normal View History

2018-05-28 08:34:54 +02:00
#pragma once
2018-05-28 08:34:54 +02:00
#include <QHash>
#include <QString>
#include <functional>
2018-05-28 08:34:54 +02:00
namespace std {
2019-10-03 10:13:49 +02:00
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
2018-05-28 08:34:54 +02:00
template <>
struct hash<QString> {
std::size_t operator()(const QString &s) const
{
return qHash(s);
}
};
2019-10-03 10:07:14 +02:00
#endif
2018-05-28 08:34:54 +02:00
} // namespace std