Make 'Event.inl' self-contained

This commit is contained in:
vittorioromeo 2024-05-06 03:40:31 +02:00 committed by Chris Thrasher
parent 2d9cc54242
commit ae269e1149
2 changed files with 12 additions and 2 deletions

View File

@ -329,10 +329,10 @@ private:
static constexpr bool isEventType = isInParameterPack<T>(decltype(m_data)()); static constexpr bool isEventType = isInParameterPack<T>(decltype(m_data)());
}; };
#include <SFML/Window/Event.inl>
} // namespace sf } // namespace sf
#include <SFML/Window/Event.inl>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \class sf::Event /// \class sf::Event

View File

@ -30,6 +30,14 @@
// to compile the code within the compiletime conditional when // to compile the code within the compiletime conditional when
// an incorrect template parameter is provided. // an incorrect template parameter is provided.
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window/Event.hpp> // NOLINT(misc-header-include-cycle)
namespace sf
{
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
template <typename T> template <typename T>
Event::Event(const T& t) Event::Event(const T& t)
@ -58,3 +66,5 @@ const T* Event::getIf() const
if constexpr (isEventType<T>) if constexpr (isEventType<T>)
return std::get_if<T>(&m_data); return std::get_if<T>(&m_data);
} }
} // namespace sf