From 4f28851ee6ebf696be6fffab176795d1144196da Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 23 May 2024 23:56:17 -0600 Subject: [PATCH] Fix outdated template code --- tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp | 6 +----- tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp b/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp index 0b6b4ec89..d71a3875d 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp @@ -26,11 +26,7 @@ int main() sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window"); // Set the Icon - sf::Image icon; - if (!icon.loadFromFile(resourcePath() / "icon.png")) - { - return EXIT_FAILURE; - } + const auto icon = sf::Image::loadFromFile(resourcePath() / "icon.png").value(); window.setIcon(icon); // Load a sprite to display diff --git a/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp b/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp index e13e6c9c7..122bccfa4 100644 --- a/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp +++ b/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp @@ -24,11 +24,7 @@ int main() sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window"); // Set the Icon - sf::Image icon; - if (!icon.loadFromFile("icon.png")) - { - return EXIT_FAILURE; - } + const auto icon = sf::Image::loadFromFile("icon.png").value(); window.setIcon(icon); // Load a sprite to display