diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index a54369cb63..55059a08e0 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -30,6 +30,12 @@ #include #include +#ifdef WX_COMPATIBILITY +#include +#else +#include +#endif + struct FlagString { int flag; @@ -67,6 +73,18 @@ void TOOL_EVENT::init() } +VECTOR2D TOOL_EVENT::returnCheckedPosition( const VECTOR2D& aPos ) const +{ +#ifdef WX_COMPATIBILITY + wxCHECK_MSG( HasPosition(), VECTOR2D(), "Attempted to get position from non-position event" ); +#else + assert( HasPosition() ); +#endif + + return aPos; +} + + bool TOOL_EVENT::IsAction( const TOOL_ACTION* aAction ) const { return Matches( aAction->MakeEvent() ); diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 6908e3c7d5..359ea4acbd 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -34,12 +34,6 @@ #include #include -#ifdef WX_COMPATIBILITY -#include -#else -#include -#endif - class TOOL_ACTION; class TOOL_MANAGER; @@ -520,17 +514,7 @@ private: * @param aPos the position to return if the event is valid * @return the checked position */ - VECTOR2D returnCheckedPosition( const VECTOR2D& aPos ) const - { - #ifdef WX_COMPATIBILITY - wxCHECK_MSG( HasPosition(), VECTOR2D(), - "Attempted to get position from non-position event" ); - #else - assert( HasPosition() ); - #endif - - return aPos; - } + VECTOR2D returnCheckedPosition( const VECTOR2D& aPos ) const; TOOL_EVENT_CATEGORY m_category; TOOL_ACTIONS m_actions;