diff --git a/include/SFML/Audio/InputSoundFile.hpp b/include/SFML/Audio/InputSoundFile.hpp index d39510946..20b946ee6 100644 --- a/include/SFML/Audio/InputSoundFile.hpp +++ b/include/SFML/Audio/InputSoundFile.hpp @@ -34,7 +34,6 @@ #include #include #include -#include namespace sf diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index 8d217a563..f4a704d20 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -33,7 +33,6 @@ #include #include -#include #include diff --git a/include/SFML/Audio/OutputSoundFile.hpp b/include/SFML/Audio/OutputSoundFile.hpp index 26497f0b6..26447137a 100644 --- a/include/SFML/Audio/OutputSoundFile.hpp +++ b/include/SFML/Audio/OutputSoundFile.hpp @@ -33,7 +33,6 @@ #include #include -#include namespace sf diff --git a/include/SFML/Audio/SoundFileFactory.hpp b/include/SFML/Audio/SoundFileFactory.hpp index 3f3d0f89e..92797f967 100644 --- a/include/SFML/Audio/SoundFileFactory.hpp +++ b/include/SFML/Audio/SoundFileFactory.hpp @@ -31,7 +31,6 @@ #include #include -#include #include diff --git a/include/SFML/Audio/SoundFileWriter.hpp b/include/SFML/Audio/SoundFileWriter.hpp index 1cf945988..4944f6f8c 100644 --- a/include/SFML/Audio/SoundFileWriter.hpp +++ b/include/SFML/Audio/SoundFileWriter.hpp @@ -30,7 +30,6 @@ #include #include -#include namespace sf diff --git a/include/SFML/Graphics/Image.hpp b/include/SFML/Graphics/Image.hpp index 09fb05b3c..933a15297 100644 --- a/include/SFML/Graphics/Image.hpp +++ b/include/SFML/Graphics/Image.hpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -156,7 +156,7 @@ public: /// \see create, loadFromFile, loadFromMemory, saveToFile /// //////////////////////////////////////////////////////////// - [[nodiscard]] bool saveToMemory(std::vector& output, const std::string& format) const; + [[nodiscard]] bool saveToMemory(std::vector& output, std::string_view format) const; //////////////////////////////////////////////////////////// /// \brief Return the size (width and height) of the image diff --git a/include/SFML/Graphics/Text.hpp b/include/SFML/Graphics/Text.hpp index ca7879a80..ad7351d76 100644 --- a/include/SFML/Graphics/Text.hpp +++ b/include/SFML/Graphics/Text.hpp @@ -35,7 +35,6 @@ #include #include -#include #include diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index ca5957539..b85177efe 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -36,7 +36,6 @@ #include #include #include -#include #ifdef SFML_SYSTEM_ANDROID namespace sf::priv diff --git a/include/SFML/System/String.hpp b/include/SFML/System/String.hpp index 590661afb..d13341dde 100644 --- a/include/SFML/System/String.hpp +++ b/include/SFML/System/String.hpp @@ -31,7 +31,6 @@ #include -#include #include #include diff --git a/include/SFML/System/Utf.hpp b/include/SFML/System/Utf.hpp index 40278676c..086d9e627 100644 --- a/include/SFML/System/Utf.hpp +++ b/include/SFML/System/Utf.hpp @@ -30,9 +30,7 @@ #include #include -#include #include -#include namespace sf diff --git a/src/SFML/Audio/SoundFileWriterWav.hpp b/src/SFML/Audio/SoundFileWriterWav.hpp index 160792c61..f4a8b13e7 100644 --- a/src/SFML/Audio/SoundFileWriterWav.hpp +++ b/src/SFML/Audio/SoundFileWriterWav.hpp @@ -29,8 +29,8 @@ //////////////////////////////////////////////////////////// #include +#include #include -#include namespace sf::priv diff --git a/src/SFML/Graphics/Image.cpp b/src/SFML/Graphics/Image.cpp index f34fb07f2..de1d0aba1 100644 --- a/src/SFML/Graphics/Image.cpp +++ b/src/SFML/Graphics/Image.cpp @@ -138,9 +138,9 @@ bool Image::saveToFile(const std::filesystem::path& filename) const } //////////////////////////////////////////////////////////// -bool Image::saveToMemory(std::vector& output, const std::string& format) const +bool Image::saveToMemory(std::vector& output, std::string_view format) const { - return priv::ImageLoader::getInstance().saveImageToMemory(format, output, m_pixels, m_size); + return priv::ImageLoader::getInstance().saveImageToMemory(std::string(format), output, m_pixels, m_size); } diff --git a/src/SFML/Window/DRM/ClipboardImpl.cpp b/src/SFML/Window/DRM/ClipboardImpl.cpp index 081aaea3a..02f946e25 100644 --- a/src/SFML/Window/DRM/ClipboardImpl.cpp +++ b/src/SFML/Window/DRM/ClipboardImpl.cpp @@ -25,9 +25,9 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// +#include #include - namespace sf::priv { //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/DRM/ClipboardImpl.hpp b/src/SFML/Window/DRM/ClipboardImpl.hpp index 9f06671e6..0d01d0155 100644 --- a/src/SFML/Window/DRM/ClipboardImpl.hpp +++ b/src/SFML/Window/DRM/ClipboardImpl.hpp @@ -24,13 +24,11 @@ #pragma once -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include +namespace sf +{ +class String; - -namespace sf::priv +namespace priv { //////////////////////////////////////////////////////////// /// \brief Give access to the system clipboard @@ -64,4 +62,5 @@ public: static void setString(const String& text); }; -} // namespace sf::priv +} // namespace priv +} // namespace sf diff --git a/src/SFML/Window/Win32/VulkanImplWin32.cpp b/src/SFML/Window/Win32/VulkanImplWin32.cpp index f68287852..d0050a6ba 100644 --- a/src/SFML/Window/Win32/VulkanImplWin32.cpp +++ b/src/SFML/Window/Win32/VulkanImplWin32.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #define VK_USE_PLATFORM_WIN32_KHR #define VK_NO_PROTOTYPES #include