Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion core/base/EventTouch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "base/EventTouch.h"
#include "base/Touch.h"

#include <utility>

namespace ax
{

Expand All @@ -34,4 +36,8 @@ EventTouch::EventTouch() : Event(Type::TOUCH)
_touches.reserve(MAX_TOUCHES);
}

}
EventTouch::EventTouch(EventCode eventCode, std::vector<Touch*> touches)
: Event(Type::TOUCH), _eventCode(eventCode), _touches(std::move(touches))
{}

} // namespace ax
18 changes: 2 additions & 16 deletions core/base/EventTouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ namespace ax

class Touch;

#define TOUCH_PERF_DEBUG 1

/** @class EventTouch
* @brief Touch event.
*/
Expand All @@ -61,6 +59,7 @@ class AX_DLL EventTouch : public Event
* Constructor.
*/
EventTouch();
EventTouch(EventCode eventCode, std::vector<Touch*> touches);

/** Get event code.
*
Expand All @@ -74,27 +73,14 @@ class AX_DLL EventTouch : public Event
*/
const std::vector<Touch*>& getTouches() const { return _touches; }

#if TOUCH_PERF_DEBUG
/** Set the event code.
*
* @param eventCode A given EventCode.
*/
void setEventCode(EventCode eventCode) { _eventCode = eventCode; };
/** Set the touches
*
* @param touches A given touches vector.
*/
void setTouches(const std::vector<Touch*>& touches) { _touches = touches; };
#endif

private:
EventCode _eventCode;
std::vector<Touch*> _touches;

friend class RenderView;
};

}
} // namespace ax

// end of base group
/// @}
Loading
Loading