1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Revert "Replace MyEventReceiver KeyList with std::unordered_set" (#10622)

This reverts commit 787561b29a.
This commit is contained in:
SmallJoker 2020-11-12 19:16:02 +01:00 committed by GitHub
parent adffef2b94
commit 68139a28eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 111 additions and 64 deletions

View file

@ -24,20 +24,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <IEventReceiver.h>
#include <string>
class KeyPress;
namespace std
{
template <> struct hash<KeyPress>;
}
/* A key press, consisting of either an Irrlicht keycode
or an actual char */
class KeyPress
{
public:
friend struct std::hash<KeyPress>;
KeyPress() = default;
KeyPress(const char *name);
@ -63,17 +55,6 @@ protected:
std::string m_name = "";
};
namespace std
{
template <> struct hash<KeyPress>
{
size_t operator()(const KeyPress &key) const
{
return key.Key;
}
};
}
extern const KeyPress EscapeKey;
extern const KeyPress CancelKey;