Remove unused headers and reduce physical dependencies

This commit is contained in:
Vittorio Romeo 2023-02-20 22:31:47 +01:00
parent 5bd3722598
commit 698b7ee49f
15 changed files with 13 additions and 24 deletions

View File

@ -34,7 +34,6 @@
#include <cstddef> #include <cstddef>
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <string>
namespace sf namespace sf

View File

@ -33,7 +33,6 @@
#include <SFML/Audio/SoundStream.hpp> #include <SFML/Audio/SoundStream.hpp>
#include <filesystem> #include <filesystem>
#include <string>
#include <vector> #include <vector>

View File

@ -33,7 +33,6 @@
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <string>
namespace sf namespace sf

View File

@ -31,7 +31,6 @@
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <string>
#include <vector> #include <vector>

View File

@ -30,7 +30,6 @@
#include <SFML/Audio/Export.hpp> #include <SFML/Audio/Export.hpp>
#include <filesystem> #include <filesystem>
#include <string>
namespace sf namespace sf

View File

@ -33,7 +33,7 @@
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <filesystem> #include <filesystem>
#include <string> #include <string_view>
#include <vector> #include <vector>
@ -156,7 +156,7 @@ public:
/// \see create, loadFromFile, loadFromMemory, saveToFile /// \see create, loadFromFile, loadFromMemory, saveToFile
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
[[nodiscard]] bool saveToMemory(std::vector<std::uint8_t>& output, const std::string& format) const; [[nodiscard]] bool saveToMemory(std::vector<std::uint8_t>& output, std::string_view format) const;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Return the size (width and height) of the image /// \brief Return the size (width and height) of the image

View File

@ -35,7 +35,6 @@
#include <SFML/Graphics/VertexArray.hpp> #include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/String.hpp> #include <SFML/System/String.hpp>
#include <string>
#include <vector> #include <vector>

View File

@ -36,7 +36,6 @@
#include <cstdio> #include <cstdio>
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <string>
#ifdef SFML_SYSTEM_ANDROID #ifdef SFML_SYSTEM_ANDROID
namespace sf::priv namespace sf::priv

View File

@ -31,7 +31,6 @@
#include <SFML/System/Utf.hpp> #include <SFML/System/Utf.hpp>
#include <iterator>
#include <locale> #include <locale>
#include <string> #include <string>

View File

@ -30,9 +30,7 @@
#include <SFML/Config.hpp> #include <SFML/Config.hpp>
#include <cstdlib> #include <cstdlib>
#include <iterator>
#include <locale> #include <locale>
#include <string>
namespace sf namespace sf

View File

@ -29,8 +29,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/SoundFileWriter.hpp> #include <SFML/Audio/SoundFileWriter.hpp>
#include <filesystem>
#include <fstream> #include <fstream>
#include <string>
namespace sf::priv namespace sf::priv

View File

@ -138,9 +138,9 @@ bool Image::saveToFile(const std::filesystem::path& filename) const
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool Image::saveToMemory(std::vector<std::uint8_t>& output, const std::string& format) const bool Image::saveToMemory(std::vector<std::uint8_t>& 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);
} }

View File

@ -25,9 +25,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/String.hpp>
#include <SFML/Window/DRM/ClipboardImpl.hpp> #include <SFML/Window/DRM/ClipboardImpl.hpp>
namespace sf::priv namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -24,13 +24,11 @@
#pragma once #pragma once
//////////////////////////////////////////////////////////// namespace sf
// Headers {
//////////////////////////////////////////////////////////// class String;
#include <SFML/System/String.hpp>
namespace priv
namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Give access to the system clipboard /// \brief Give access to the system clipboard
@ -64,4 +62,5 @@ public:
static void setString(const String& text); static void setString(const String& text);
}; };
} // namespace sf::priv } // namespace priv
} // namespace sf

View File

@ -29,7 +29,7 @@
#include <SFML/Window/Win32/VulkanImplWin32.hpp> #include <SFML/Window/Win32/VulkanImplWin32.hpp>
#include <map> #include <map>
#include <string> #include <string_view>
#define VK_USE_PLATFORM_WIN32_KHR #define VK_USE_PLATFORM_WIN32_KHR
#define VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES
#include <vulkan.h> #include <vulkan.h>