Remove unnecessary includes from public-facing headers

This commit is contained in:
Vittorio Romeo 2022-02-10 17:19:01 +00:00
parent d7f48d15c6
commit 63ce7e4e92
36 changed files with 41 additions and 16 deletions

View File

@ -29,7 +29,6 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp> #include <SFML/Audio/Export.hpp>
#include <SFML/System/Time.hpp>
#include <memory> #include <memory>
#include <string> #include <string>
#include <cstddef> #include <cstddef>
@ -37,6 +36,7 @@
namespace sf namespace sf
{ {
class Time;
class InputStream; class InputStream;
class SoundFileReader; class SoundFileReader;

View File

@ -31,13 +31,13 @@
#include <SFML/Audio/Export.hpp> #include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundStream.hpp> #include <SFML/Audio/SoundStream.hpp>
#include <SFML/Audio/InputSoundFile.hpp> #include <SFML/Audio/InputSoundFile.hpp>
#include <SFML/System/Time.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
namespace sf namespace sf
{ {
class Time;
class InputStream; class InputStream;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -30,12 +30,12 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp> #include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundSource.hpp> #include <SFML/Audio/SoundSource.hpp>
#include <SFML/System/Time.hpp>
#include <cstdlib> #include <cstdlib>
namespace sf namespace sf
{ {
class Time;
class SoundBuffer; class SoundBuffer;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -29,12 +29,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/RenderStates.hpp>
namespace sf namespace sf
{ {
class RenderTarget; class RenderTarget;
class RenderStates;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Abstract base class for objects that can be drawn /// \brief Abstract base class for objects that can be drawn

View File

@ -32,7 +32,6 @@
#include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/View.hpp> #include <SFML/Graphics/View.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <SFML/Graphics/BlendMode.hpp> #include <SFML/Graphics/BlendMode.hpp>
#include <SFML/Graphics/RenderStates.hpp> #include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/PrimitiveType.hpp> #include <SFML/Graphics/PrimitiveType.hpp>
@ -44,6 +43,7 @@ namespace sf
{ {
class Drawable; class Drawable;
class VertexBuffer; class VertexBuffer;
class Transform;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Base class for all render targets (window, texture, ...) /// \brief Base class for all render targets (window, texture, ...)

View File

@ -30,7 +30,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Window/Window.hpp> #include <SFML/Window/Window.hpp>

View File

@ -37,6 +37,8 @@
namespace sf namespace sf
{ {
class Texture;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Base class for textured shapes with outline /// \brief Base class for textured shapes with outline
/// ///

View File

@ -31,7 +31,6 @@
#include <SFML/Graphics/Export.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/VertexArray.hpp> #include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/String.hpp> #include <SFML/System/String.hpp>
@ -41,6 +40,8 @@
namespace sf namespace sf
{ {
class Font;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Graphical text that can be drawn to a render target /// \brief Graphical text that can be drawn to a render target
/// ///

View File

@ -29,8 +29,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <string>
namespace sf namespace sf
@ -40,6 +41,7 @@ class RenderTarget;
class RenderTexture; class RenderTexture;
class Text; class Text;
class Window; class Window;
class Image;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Image living on the graphics card that can be used for drawing /// \brief Image living on the graphics card that can be used for drawing

View File

@ -30,7 +30,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp> #include <SFML/Network/Export.hpp>
#include <SFML/Network/TcpSocket.hpp> #include <SFML/Network/TcpSocket.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -29,7 +29,6 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Export.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/Time.hpp>
#include <chrono> #include <chrono>
#include <ratio> #include <ratio>
#include <type_traits> #include <type_traits>
@ -80,6 +79,8 @@ namespace priv
} // namespace priv } // namespace priv
class Time;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Utility class that measures the elapsed time /// \brief Utility class that measures the elapsed time
/// ///

View File

@ -29,11 +29,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Export.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/Time.hpp>
namespace sf namespace sf
{ {
class Time;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \ingroup system /// \ingroup system
/// \brief Make the current thread sleep for a given duration /// \brief Make the current thread sleep for a given duration

View File

@ -30,7 +30,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/Export.hpp> #include <SFML/Window/Export.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <memory> #include <memory>
@ -41,6 +40,8 @@ namespace priv
class GlContext; class GlContext;
} }
struct ContextSettings;
using GlFunctionPointer = void (*)(); using GlFunctionPointer = void (*)();
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -30,7 +30,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/Export.hpp> #include <SFML/Window/Export.hpp>
#include <SFML/System/Vector3.hpp> #include <SFML/System/Vector3.hpp>
#include <SFML/System/Time.hpp>
namespace sf namespace sf

View File

@ -29,7 +29,6 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/Export.hpp> #include <SFML/Window/Export.hpp>
#include <SFML/Window/WindowHandle.hpp>
#include <vector> #include <vector>
#include <cstdint> #include <cstdint>

View File

@ -31,6 +31,7 @@
#include <SFML/Window/ContextSettings.hpp> #include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/Window/WindowBase.hpp> #include <SFML/Window/WindowBase.hpp>
#include <SFML/System/Time.hpp>
#include <memory> #include <memory>

View File

@ -32,6 +32,7 @@
#include <SFML/System/FileInputStream.hpp> #include <SFML/System/FileInputStream.hpp>
#include <SFML/System/MemoryInputStream.hpp> #include <SFML/System/MemoryInputStream.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>

View File

@ -28,6 +28,7 @@
#include <SFML/Audio/Music.hpp> #include <SFML/Audio/Music.hpp>
#include <SFML/Audio/ALCheck.hpp> #include <SFML/Audio/ALCheck.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <fstream> #include <fstream>
#include <algorithm> #include <algorithm>
#include <mutex> #include <mutex>

View File

@ -32,6 +32,7 @@
#include <SFML/Audio/AudioDevice.hpp> #include <SFML/Audio/AudioDevice.hpp>
#include <SFML/Audio/ALCheck.hpp> #include <SFML/Audio/ALCheck.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <memory> #include <memory>
#if defined(__APPLE__) #if defined(__APPLE__)

View File

@ -27,6 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Font.hpp> #include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/GLCheck.hpp> #include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/Image.hpp>
#ifdef SFML_SYSTEM_ANDROID #ifdef SFML_SYSTEM_ANDROID
#include <SFML/System/Android/ResourceStream.hpp> #include <SFML/System/Android/ResourceStream.hpp>
#endif #endif

View File

@ -29,6 +29,7 @@
#include <SFML/Graphics/GLCheck.hpp> #include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/TextureSaver.hpp> #include <SFML/Graphics/TextureSaver.hpp>
#include <SFML/Window/Context.hpp> #include <SFML/Window/Context.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <memory> #include <memory>

View File

@ -29,6 +29,7 @@
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/GLCheck.hpp> #include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Window/Context.hpp> #include <SFML/Window/Context.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <mutex> #include <mutex>
#include <set> #include <set>

View File

@ -28,6 +28,7 @@
#include <SFML/Graphics/Text.hpp> #include <SFML/Graphics/Text.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Font.hpp>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>

View File

@ -41,6 +41,7 @@
#include <SFML/System/Android/Activity.hpp> #include <SFML/System/Android/Activity.hpp>
#include <SFML/System/Sleep.hpp> #include <SFML/System/Sleep.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <android/window.h> #include <android/window.h>
#include <android/native_activity.h> #include <android/native_activity.h>
#include <cstring> #include <cstring>

View File

@ -26,6 +26,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Clock.hpp> #include <SFML/System/Clock.hpp>
#include <SFML/System/Time.hpp>
namespace sf namespace sf

View File

@ -26,6 +26,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Sleep.hpp> #include <SFML/System/Sleep.hpp>
#include <SFML/System/Time.hpp>
#if defined(SFML_SYSTEM_WINDOWS) #if defined(SFML_SYSTEM_WINDOWS)
#include <SFML/System/Win32/SleepImpl.hpp> #include <SFML/System/Win32/SleepImpl.hpp>

View File

@ -26,6 +26,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Unix/SleepImpl.hpp> #include <SFML/System/Unix/SleepImpl.hpp>
#include <SFML/System/Time.hpp>
#include <cerrno> #include <cerrno>
#include <ctime> #include <ctime>

View File

@ -29,9 +29,10 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Config.hpp>
#include <SFML/System/Time.hpp>
namespace sf { class Time; }
namespace sf::priv namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -27,6 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Win32/SleepImpl.hpp> #include <SFML/System/Win32/SleepImpl.hpp>
#include <SFML/System/Win32/WindowsHeader.hpp> #include <SFML/System/Win32/WindowsHeader.hpp>
#include <SFML/System/Time.hpp>
#include <mmsystem.h> #include <mmsystem.h>
namespace sf::priv namespace sf::priv

View File

@ -29,11 +29,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Config.hpp>
#include <SFML/System/Time.hpp>
namespace sf { class Time; }
namespace sf::priv namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Windows implementation of sf::Sleep /// \brief Windows implementation of sf::Sleep
/// ///

View File

@ -29,6 +29,7 @@
#include <SFML/Window/Unix/Display.hpp> #include <SFML/Window/Unix/Display.hpp>
#include <SFML/System/Clock.hpp> #include <SFML/System/Clock.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <vector> #include <vector>

View File

@ -33,6 +33,7 @@
#include <SFML/System/Utf.hpp> #include <SFML/System/Utf.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Sleep.hpp> #include <SFML/System/Sleep.hpp>
#include <SFML/System/Time.hpp>
#include <X11/Xlibint.h> #include <X11/Xlibint.h>
#undef min // Defined by `Xlibint.h`, conflicts with standard headers #undef min // Defined by `Xlibint.h`, conflicts with standard headers

View File

@ -29,6 +29,7 @@
#include <SFML/System/Win32/WindowsHeader.hpp> #include <SFML/System/Win32/WindowsHeader.hpp>
#include <SFML/System/Clock.hpp> #include <SFML/System/Clock.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <tchar.h> #include <tchar.h>
#include <regstr.h> #include <regstr.h>
#include <cmath> #include <cmath>

View File

@ -31,6 +31,7 @@
#include <SFML/Window/JoystickManager.hpp> #include <SFML/Window/JoystickManager.hpp>
#include <SFML/Window/SensorManager.hpp> #include <SFML/Window/SensorManager.hpp>
#include <SFML/System/Sleep.hpp> #include <SFML/System/Sleep.hpp>
#include <SFML/System/Time.hpp>
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
#include <cmath> #include <cmath>

View File

@ -30,6 +30,7 @@
#include <SFML/Window/iOS/SFView.hpp> #include <SFML/Window/iOS/SFView.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Sleep.hpp> #include <SFML/System/Sleep.hpp>
#include <SFML/System/Time.hpp>
#include <OpenGLES/EAGL.h> #include <OpenGLES/EAGL.h>
#include <OpenGLES/EAGLDrawable.h> #include <OpenGLES/EAGLDrawable.h>
#include <QuartzCore/CAEAGLLayer.h> #include <QuartzCore/CAEAGLLayer.h>

View File

@ -1,4 +1,5 @@
#include <SFML/System/Clock.hpp> #include <SFML/System/Clock.hpp>
#include <SFML/System/Time.hpp>
#include "SystemUtil.hpp" #include "SystemUtil.hpp"
#include <thread> #include <thread>