From 7a7daa06a06110abc743b5ebd9da85620a5679b4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 1 Aug 2023 22:48:35 +0100 Subject: gentoo auto-resync : 01:08:2023 - 22:48:35 --- .../files/libsfml-2.5.1-clang-16-auto_ptr.patch | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch (limited to 'media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch') diff --git a/media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch b/media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch new file mode 100644 index 000000000000..ba4f90e4c465 --- /dev/null +++ b/media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch @@ -0,0 +1,50 @@ +https://github.com/SFML/SFML/commit/bf92efe9a4035fee0258386173d53556aa196e49 +Bug: https://bugs.gentoo.org/910519 +From: Tobias Widlund +Date: Fri, 18 Jan 2019 14:12:14 +0100 +Subject: [PATCH] Remove usages of std::auto_ptr to get rid of warnings when + building with gcc 8.2+ + +--- a/src/SFML/Audio/AudioDevice.cpp ++++ b/src/SFML/Audio/AudioDevice.cpp +@@ -29,7 +29,7 @@ + #include + #include + #include +-#include ++#include + + + namespace +@@ -107,9 +107,13 @@ bool AudioDevice::isExtensionSupported(const std::string& extension) + // This device will not be used in this function and merely + // makes sure there is a valid OpenAL device for extension + // queries if none has been created yet. +- std::auto_ptr device; ++ // ++ // Using an std::vector for this since auto_ptr is deprecated ++ // and we have no better STL facility for dynamically allocating ++ // a temporary instance with strong exception guarantee. ++ std::vector device; + if (!audioDevice) +- device.reset(new AudioDevice); ++ device.resize(1); + + if ((extension.length() > 2) && (extension.substr(0, 3) == "ALC")) + return alcIsExtensionPresent(audioDevice, extension.c_str()) != AL_FALSE; +@@ -125,9 +129,13 @@ int AudioDevice::getFormatFromChannelCount(unsigned int channelCount) + // This device will not be used in this function and merely + // makes sure there is a valid OpenAL device for format + // queries if none has been created yet. +- std::auto_ptr device; ++ // ++ // Using an std::vector for this since auto_ptr is deprecated ++ // and we have no better STL facility for dynamically allocating ++ // a temporary instance with strong exception guarantee. ++ std::vector device; + if (!audioDevice) +- device.reset(new AudioDevice); ++ device.resize(1); + + // Find the good format according to the number of channels + int format = 0; -- cgit v1.2.3