From 106da21dd1a23907a2783da7e07939e874204aa6 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Fri, 18 Feb 2022 10:36:25 -0700 Subject: [PATCH] Revert accidental filesystem conversion "extension" in this context is not referring to a file extension. --- src/SFML/Audio/AudioDevice.cpp | 8 ++++---- src/SFML/Audio/AudioDevice.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SFML/Audio/AudioDevice.cpp b/src/SFML/Audio/AudioDevice.cpp index 317887a5..feaf677e 100644 --- a/src/SFML/Audio/AudioDevice.cpp +++ b/src/SFML/Audio/AudioDevice.cpp @@ -109,7 +109,7 @@ AudioDevice::~AudioDevice() //////////////////////////////////////////////////////////// -bool AudioDevice::isExtensionSupported(const std::filesystem::path& extension) +bool AudioDevice::isExtensionSupported(const std::string& extension) { // Create a temporary audio device in case none exists yet. // This device will not be used in this function and merely @@ -119,10 +119,10 @@ bool AudioDevice::isExtensionSupported(const std::filesystem::path& extension) if (!audioDevice) device.emplace(); - if ((extension.string().length() > 2) && (extension.string().substr(0, 3) == "ALC")) - return alcIsExtensionPresent(audioDevice, extension.string().c_str()) != AL_FALSE; + if ((extension.length() > 2) && (extension.substr(0, 3) == "ALC")) + return alcIsExtensionPresent(audioDevice, extension.c_str()) != AL_FALSE; else - return alIsExtensionPresent(extension.string().c_str()) != AL_FALSE; + return alIsExtensionPresent(extension.c_str()) != AL_FALSE; } diff --git a/src/SFML/Audio/AudioDevice.hpp b/src/SFML/Audio/AudioDevice.hpp index 817e868b..4ae9db2e 100644 --- a/src/SFML/Audio/AudioDevice.hpp +++ b/src/SFML/Audio/AudioDevice.hpp @@ -29,7 +29,7 @@ // Headers //////////////////////////////////////////////////////////// #include -#include +#include namespace sf @@ -70,7 +70,7 @@ public: /// \return True if the extension is supported, false if not /// //////////////////////////////////////////////////////////// - static bool isExtensionSupported(const std::filesystem::path& extension); + static bool isExtensionSupported(const std::string& extension); //////////////////////////////////////////////////////////// /// \brief Get the OpenAL format that matches the given number of channels