summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-30 21:24:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-30 21:24:44 +0300
commite70ebdb9b0186779ddcdc2d0f6d8eceb81c85101 (patch)
treec967cd3d7d07e86e11cabb1afe36fc454f29cf97
parent9ff808fb20962884d56147d46c8e4de915a0735d (diff)
downloadplus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.tar.gz
plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.tar.bz2
plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.tar.xz
plus-e70ebdb9b0186779ddcdc2d0f6d8eceb81c85101.zip
Add copy constructor into KeyInput.
-rw-r--r--src/input/keyinput.h21
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()
{ }