forked from Chatterino/chatterino2
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into chatterino7
- Loading branch information
Showing
56 changed files
with
1,466 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,50 @@ | ||
#pragma once | ||
|
||
#include <boost/container_hash/hash_fwd.hpp> | ||
#include <QHash> | ||
#include <QString> | ||
|
||
#include <functional> | ||
|
||
#define QStringAlias(name) \ | ||
namespace chatterino { \ | ||
struct name { \ | ||
QString string; \ | ||
bool operator==(const name &other) const \ | ||
{ \ | ||
return this->string == other.string; \ | ||
} \ | ||
bool operator!=(const name &other) const \ | ||
{ \ | ||
return this->string != other.string; \ | ||
} \ | ||
}; \ | ||
} /* namespace chatterino */ \ | ||
namespace std { \ | ||
template <> \ | ||
struct hash<chatterino::name> { \ | ||
size_t operator()(const chatterino::name &s) const \ | ||
{ \ | ||
return qHash(s.string); \ | ||
} \ | ||
}; \ | ||
} /* namespace std */ | ||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage) | ||
#define QStringAlias(name) \ | ||
namespace chatterino { \ | ||
struct name { \ | ||
QString string; \ | ||
bool operator==(const name &other) const \ | ||
{ \ | ||
return this->string == other.string; \ | ||
} \ | ||
bool operator!=(const name &other) const \ | ||
{ \ | ||
return this->string != other.string; \ | ||
} \ | ||
}; \ | ||
} /* namespace chatterino */ \ | ||
namespace std { \ | ||
template <> \ | ||
struct hash<chatterino::name> { \ | ||
size_t operator()(const chatterino::name &s) const \ | ||
{ \ | ||
return qHash(s.string); \ | ||
} \ | ||
}; \ | ||
} /* namespace std */ \ | ||
namespace boost { \ | ||
template <> \ | ||
struct hash<chatterino::name> { \ | ||
std::size_t operator()(chatterino::name const &s) const \ | ||
{ \ | ||
return qHash(s.string); \ | ||
} \ | ||
}; \ | ||
} /* namespace boost */ | ||
|
||
QStringAlias(UserName); | ||
QStringAlias(UserId); | ||
QStringAlias(Url); | ||
QStringAlias(Tooltip); | ||
QStringAlias(EmoteId); | ||
QStringAlias(EmoteSetId); | ||
QStringAlias(EmoteName); | ||
QStringAlias(EmoteAuthor); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.