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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,8 +29,9 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Window/GlResource.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <string>
namespace sf
@ -40,6 +41,7 @@ class RenderTarget;
class RenderTexture;
class Text;
class Window;
class Image;
////////////////////////////////////////////////////////////
/// \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/TcpSocket.hpp>
#include <SFML/System/Time.hpp>
#include <string>
#include <vector>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,6 +33,7 @@
#include <SFML/System/Utf.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/System/Sleep.hpp>
#include <SFML/System/Time.hpp>
#include <X11/Xlibint.h>
#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/Clock.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <tchar.h>
#include <regstr.h>
#include <cmath>

View File

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

View File

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

View File

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