///////////////////////////////////////////////////////
| 157 | |
| 158 | //////////////////////////////////////////////////////////// |
| 159 | std::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 | //////////////////////////////////////////////////////////// |
no outgoing calls
no test coverage detected