diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-30 21:24:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-30 21:24:44 +0300 |
commit | e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101 (patch) | |
tree | c967cd3d7d07e86e11cabb1afe36fc454f29cf97 /src/input/keyinput.h | |
parent | 9ff808fb20962884d56147d46c8e4de915a0735d (diff) | |
download | plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.tar.gz plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.tar.bz2 plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.tar.xz plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.zip |
Add copy constructor into KeyInput.
Diffstat (limited to 'src/input/keyinput.h')
-rw-r--r-- | src/input/keyinput.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/input/keyinput.h b/src/input/keyinput.h index 81db273cc..fb8246cf5 100644 --- a/src/input/keyinput.h +++ b/src/input/keyinput.h @@ -84,6 +84,27 @@ class KeyInput final mActionId(InputAction::UNDEFINED_VALUE) { } + KeyInput(const KeyInput &k) : + mKey(k.mKey), + mType(k.mType), +#ifdef USE_SDL2 + mText(k.mText), +#endif + mActionId(k.mActionId) + { + } + + KeyInput &operator=(const KeyInput &k) + { + mKey = k.mKey; + mType = k.mType; +#ifdef USE_SDL2 + mText = k.mText; +#endif + mActionId = k.mActionId; + return *this; + } + ~KeyInput() { } |