From 33a7c4d2a8a5e44a433d7d2c1ef8066716907428 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Mon, 14 Mar 2022 19:32:26 -0600 Subject: [PATCH] Clean up filesystem path usage in examples --- examples/opengl/OpenGL.cpp | 2 +- examples/sound/Sound.cpp | 4 ++-- examples/tennis/Tennis.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp index a53570c2..78d339d3 100644 --- a/examples/opengl/OpenGL.cpp +++ b/examples/opengl/OpenGL.cpp @@ -22,7 +22,7 @@ std::filesystem::path resourcesDir() #ifdef SFML_SYSTEM_IOS return ""; #else - return "resources/"; + return "resources"; #endif } diff --git a/examples/sound/Sound.cpp b/examples/sound/Sound.cpp index 71a4a11b..67401cc8 100644 --- a/examples/sound/Sound.cpp +++ b/examples/sound/Sound.cpp @@ -46,11 +46,11 @@ void playSound() /// Play a music /// //////////////////////////////////////////////////////////// -void playMusic(const std::string& filename) +void playMusic(const std::filesystem::path& filename) { // Load an ogg music file sf::Music music; - if (!music.openFromFile("resources/" + filename)) + if (!music.openFromFile("resources" / filename)) return; // Display music informations diff --git a/examples/tennis/Tennis.cpp b/examples/tennis/Tennis.cpp index 1906ce2e..1bce9c31 100644 --- a/examples/tennis/Tennis.cpp +++ b/examples/tennis/Tennis.cpp @@ -17,7 +17,7 @@ std::filesystem::path resourcesDir() #ifdef SFML_SYSTEM_IOS return ""; #else - return "resources/"; + return "resources"; #endif }