diff --git a/src/SFML/Window/Android/VideoModeImpl.cpp b/src/SFML/Window/Android/VideoModeImpl.cpp index 1828f463..b66ab10f 100644 --- a/src/SFML/Window/Android/VideoModeImpl.cpp +++ b/src/SFML/Window/Android/VideoModeImpl.cpp @@ -37,13 +37,10 @@ namespace sf::priv //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() { - VideoMode desktop = getDesktopMode(); + const VideoMode desktop = getDesktopMode(); // Return both portrait and landscape resolutions - std::vector modes; - modes.push_back(desktop); - modes.emplace_back(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel); - return modes; + return {desktop, VideoMode(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel)}; } diff --git a/src/SFML/Window/iOS/VideoModeImpl.mm b/src/SFML/Window/iOS/VideoModeImpl.mm index 58d9bba7..4bff95bc 100644 --- a/src/SFML/Window/iOS/VideoModeImpl.mm +++ b/src/SFML/Window/iOS/VideoModeImpl.mm @@ -35,13 +35,10 @@ namespace sf::priv //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() { - VideoMode desktop = getDesktopMode(); + const VideoMode desktop = getDesktopMode(); // Return both portrait and landscape resolutions - std::vector modes; - modes.push_back(desktop); - modes.emplace_back(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel); - return modes; + return {desktop, VideoMode(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel)}; }