MCPcopy Create free account
hub / github.com/SFML/SFML / waitEvent

Method waitEvent

src/SFML/Window/WindowBase.cpp:159–172  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

157
158////////////////////////////////////////////////////////////
159std::optional<Event> WindowBase::waitEvent(Time timeout)
160{
161 std::optional<sf::Event> event; // Use a single local variable for NRVO
162
163 if (m_impl == nullptr)
164 return event; // Empty optional
165
166 event = m_impl->waitEvent(timeout);
167
168 if (event.has_value())
169 filterEvent(*event);
170
171 return event;
172}
173
174
175////////////////////////////////////////////////////////////

Callers 2

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected