Do not use 'sf::err' in examples

This commit is contained in:
Vittorio Romeo 2024-05-15 03:00:19 +02:00 committed by Chris Thrasher
parent 353cd9717f
commit a61eb6aeef

View File

@ -6,6 +6,7 @@
#include <SFML/Audio.hpp> #include <SFML/Audio.hpp>
#include <algorithm> #include <algorithm>
#include <iostream>
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <vector> #include <vector>
@ -113,7 +114,7 @@ public:
// Load the music file // Load the music file
if (!m_music.openFromFile(resourcesDir() / "doodle_pop.ogg")) if (!m_music.openFromFile(resourcesDir() / "doodle_pop.ogg"))
sf::err() << "Failed to load " << (resourcesDir() / "doodle_pop.ogg").string() << std::endl; std::cerr << "Failed to load " << (resourcesDir() / "doodle_pop.ogg").string() << std::endl;
// Set the music to loop // Set the music to loop
m_music.setLoop(true); m_music.setLoop(true);
@ -172,7 +173,7 @@ public:
{ {
// Load the music file // Load the music file
if (!m_music.openFromFile(resourcesDir() / "doodle_pop.ogg")) if (!m_music.openFromFile(resourcesDir() / "doodle_pop.ogg"))
sf::err() << "Failed to load " << (resourcesDir() / "doodle_pop.ogg").string() << std::endl; std::cerr << "Failed to load " << (resourcesDir() / "doodle_pop.ogg").string() << std::endl;
// Set the music to loop // Set the music to loop
m_music.setLoop(true); m_music.setLoop(true);
@ -275,7 +276,7 @@ public:
// Load the music file // Load the music file
if (!m_music.openFromFile(resourcesDir() / "doodle_pop.ogg")) if (!m_music.openFromFile(resourcesDir() / "doodle_pop.ogg"))
sf::err() << "Failed to load " << (resourcesDir() / "doodle_pop.ogg").string() << std::endl; std::cerr << "Failed to load " << (resourcesDir() / "doodle_pop.ogg").string() << std::endl;
// Set the music to loop // Set the music to loop
m_music.setLoop(true); m_music.setLoop(true);