mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Make 'Event.inl' self-contained
This commit is contained in:
parent
2d9cc54242
commit
ae269e1149
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user