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)());
};
#include <SFML/Window/Event.inl>
} // namespace sf
#include <SFML/Window/Event.inl>
////////////////////////////////////////////////////////////
/// \class sf::Event

View File

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