Fix outdated template code

This commit is contained in:
Chris Thrasher 2024-05-23 23:56:17 -06:00
parent e53f4d62af
commit 4f28851ee6
2 changed files with 2 additions and 10 deletions

View File

@ -26,11 +26,7 @@ int main()
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window"); sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
// Set the Icon // Set the Icon
sf::Image icon; const auto icon = sf::Image::loadFromFile(resourcePath() / "icon.png").value();
if (!icon.loadFromFile(resourcePath() / "icon.png"))
{
return EXIT_FAILURE;
}
window.setIcon(icon); window.setIcon(icon);
// Load a sprite to display // Load a sprite to display

View File

@ -24,11 +24,7 @@ int main()
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window"); sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
// Set the Icon // Set the Icon
sf::Image icon; const auto icon = sf::Image::loadFromFile("icon.png").value();
if (!icon.loadFromFile("icon.png"))
{
return EXIT_FAILURE;
}
window.setIcon(icon); window.setIcon(icon);
// Load a sprite to display // Load a sprite to display