Initialize Event object
This commit is contained in:
parent
1fb5f23885
commit
9ca1f6f12d
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ void Canvas::render() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<sf::Event> Canvas::pollEvent() {
|
std::optional<sf::Event> Canvas::pollEvent() {
|
||||||
sf::Event event;
|
sf::Event event{};
|
||||||
if (window.pollEvent(event))
|
if (window.pollEvent(event))
|
||||||
return event;
|
return event;
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
Loading…
Reference in a new issue