From b8fefae63e5ddd8a3463988fbfeaea25d389e225 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Apr 2016 21:28:40 +0300 Subject: Add copy constructor into MouseInput. --- src/input/mouseinput.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h index 7711381fa..e4efa93c9 100644 --- a/src/input/mouseinput.h +++ b/src/input/mouseinput.h @@ -82,6 +82,29 @@ class MouseInput final mRealY(0) { } + MouseInput(const MouseInput &m) : + mType(m.mType), + mButton(m.mButton), + mTimeStamp(m.mTimeStamp), + mX(m.mX), + mY(m.mY), + mRealX(m.mRealX), + mRealY(m.mRealY) + { + } + + MouseInput &operator=(const MouseInput &m) + { + mType = m.mType; + mButton = m.mButton; + mTimeStamp = m.mTimeStamp; + mX = m.mX; + mY = m.mY; + mRealX = m.mRealX; + mRealY = m.mRealY; + return *this; + } + ~MouseInput() { } -- cgit v1.2.3-70-g09d2