///////////////////////////////////////////////////////
| 140 | |
| 141 | //////////////////////////////////////////////////////////// |
| 142 | std::optional<Event> WindowBase::pollEvent() |
| 143 | { |
| 144 | std::optional<sf::Event> event; // Use a single local variable for NRVO |
| 145 | |
| 146 | if (m_impl == nullptr) |
| 147 | return event; // Empty optional |
| 148 | |
| 149 | event = m_impl->pollEvent(); |
| 150 | |
| 151 | if (event.has_value()) |
| 152 | filterEvent(*event); |
| 153 | |
| 154 | return event; |
| 155 | } |
| 156 | |
| 157 | |
| 158 | //////////////////////////////////////////////////////////// |
no outgoing calls
no test coverage detected