Header cleanup guided by IWYU

This commit is contained in:
vittorioromeo 2024-02-08 14:28:57 +01:00 committed by Vittorio Romeo
parent 72d30e7beb
commit b552148e26
119 changed files with 311 additions and 82 deletions

View File

@ -3,7 +3,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network.hpp> #include <SFML/Network.hpp>
#include <fstream>
#include <iostream> #include <iostream>
#include <optional> #include <optional>

View File

@ -16,6 +16,7 @@
#include <vector> #include <vector>
#include <cmath> #include <cmath>
#include <cstdint>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -4,6 +4,7 @@
#include <SFML/Graphics.hpp> #include <SFML/Graphics.hpp>
#include <array> #include <array>
#include <filesystem>
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>

View File

@ -3,9 +3,17 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include "Effect.hpp" #include "Effect.hpp"
#include <array> #include <SFML/Graphics.hpp>
#include <random>
#include <array>
#include <optional>
#include <random>
#include <string>
#include <vector>
#include <cmath>
#include <cstdint>
#include <cstdlib>
namespace namespace
{ {

View File

@ -5,6 +5,9 @@
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <optional>
#include <cstddef>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -7,6 +7,8 @@
#include <iostream> #include <iostream>
#include <optional> #include <optional>
#include <cstddef>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Launch a server, wait for a message, send an answer. /// Launch a server, wait for a message, send an answer.

View File

@ -3,6 +3,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp> #include <SFML/Graphics.hpp>
#include <cstdlib>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// Entry point of application /// Entry point of application
/// ///

View File

@ -5,7 +5,12 @@
#include <SFML/Audio.hpp> #include <SFML/Audio.hpp>
#include <filesystem>
#include <random> #include <random>
#include <string>
#include <cmath>
#include <cstdlib>
#ifdef SFML_SYSTEM_IOS #ifdef SFML_SYSTEM_IOS
#include <SFML/Main.hpp> #include <SFML/Main.hpp>

View File

@ -6,6 +6,10 @@
#include <SFML/Network.hpp> #include <SFML/Network.hpp>
#include <iostream> #include <iostream>
#include <optional>
#include <cstddef>
#include <cstdint>
const std::uint8_t clientAudioData = 1; const std::uint8_t clientAudioData = 1;

View File

@ -6,9 +6,11 @@
#include <SFML/Network.hpp> #include <SFML/Network.hpp>
#include <iostream> #include <iostream>
#include <iterator>
#include <mutex> #include <mutex>
#include <optional>
#include <vector>
#include <cstdint>
#include <cstring> #include <cstring>

View File

@ -13,9 +13,11 @@
#include <array> #include <array>
#include <iostream> #include <iostream>
#include <limits> #include <limits>
#include <string_view>
#include <vector> #include <vector>
#include <cmath> #include <cmath>
#include <cstdint>
#include <cstring> #include <cstring>

View File

@ -33,8 +33,10 @@
#include <SFML/Audio/SoundStream.hpp> #include <SFML/Audio/SoundStream.hpp>
#include <filesystem> #include <filesystem>
#include <mutex>
#include <vector> #include <vector>
#include <cstddef>
#include <cstdint> #include <cstdint>

View File

@ -34,6 +34,8 @@
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <cstdint>
namespace sf namespace sf
{ {

View File

@ -37,6 +37,7 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include <cstddef>
#include <cstdint> #include <cstdint>

View File

@ -34,6 +34,9 @@
#include <vector> #include <vector>
#include <cstddef>
#include <cstdint>
namespace sf namespace sf
{ {

View File

@ -27,7 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/SoundFileFactory.hpp> // NOLINT(misc-header-include-cycle) #include <SFML/Audio/SoundFileFactory.hpp> // NOLINT(misc-header-include-cycle)
#include <algorithm> #include <memory>
namespace sf namespace sf

View File

@ -31,6 +31,10 @@
#include <SFML/Graphics/Shape.hpp> #include <SFML/Graphics/Shape.hpp>
#include <SFML/System/Vector2.hpp>
#include <cstddef>
namespace sf namespace sf
{ {

View File

@ -33,6 +33,8 @@
#include <vector> #include <vector>
#include <cstddef>
namespace sf namespace sf
{ {

View File

@ -33,11 +33,17 @@
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/System/Vector2.hpp>
#include <filesystem>
#include <memory> #include <memory>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <cstddef>
#include <cstdint>
#ifdef SFML_SYSTEM_ANDROID #ifdef SFML_SYSTEM_ANDROID
namespace sf::priv namespace sf::priv

View File

@ -27,9 +27,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
#include <SFML/System/Vector3.hpp> #include <SFML/System/Vector3.hpp>

View File

@ -25,8 +25,18 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Glsl.hpp> // NOLINT(misc-header-include-cycle) #include <SFML/Graphics/Glsl.hpp> // NOLINT(misc-header-include-cycle)
#include <cstddef>
namespace sf
{
class Color;
class Transform;
} // namespace sf
namespace sf::priv namespace sf::priv
{ {

View File

@ -32,11 +32,16 @@
#include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/System/Vector2.hpp>
#include <filesystem> #include <filesystem>
#include <optional> #include <optional>
#include <string_view> #include <string_view>
#include <vector> #include <vector>
#include <cstddef>
#include <cstdint>
namespace sf namespace sf
{ {

View File

@ -31,6 +31,10 @@
#include <SFML/Graphics/Shape.hpp> #include <SFML/Graphics/Shape.hpp>
#include <SFML/System/Vector2.hpp>
#include <cstddef>
namespace sf namespace sf
{ {

View File

@ -39,16 +39,21 @@
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
#include <SFML/Graphics/View.hpp> #include <SFML/Graphics/View.hpp>
#include <SFML/System/Vector2.hpp>
#include <array> #include <array>
#include <cstddef> #include <cstddef>
#include <cstdint>
namespace sf namespace sf
{ {
class Drawable; class Drawable;
class VertexBuffer; class Shader;
class Texture;
class Transform; class Transform;
class VertexBuffer;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Base class for all render targets (window, texture, ...) /// \brief Base class for all render targets (window, texture, ...)

View File

@ -34,6 +34,8 @@
#include <SFML/Window/ContextSettings.hpp> #include <SFML/Window/ContextSettings.hpp>
#include <SFML/System/Vector2.hpp>
#include <memory> #include <memory>

View File

@ -31,12 +31,21 @@
#include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/VideoMode.hpp>
#include <SFML/Window/Window.hpp> #include <SFML/Window/Window.hpp>
#include <SFML/Window/WindowEnums.hpp>
#include <SFML/Window/WindowHandle.hpp>
#include <SFML/System/Vector2.hpp>
#include <cstdint>
namespace sf namespace sf
{ {
class Image; class Image;
class String;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Window that can serve as a target for 2D drawing /// \brief Window that can serve as a target for 2D drawing

View File

@ -33,20 +33,17 @@
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/System/Vector3.hpp>
#include <filesystem> #include <filesystem>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include <cstddef>
namespace sf namespace sf
{ {
class Color;
class InputStream; class InputStream;
class Texture; class Texture;
class Transform;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Shader class (vertex, geometry and fragment) /// \brief Shader class (vertex, geometry and fragment)

View File

@ -29,16 +29,23 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/VertexArray.hpp> #include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
#include <cstddef>
namespace sf namespace sf
{ {
class Texture; class Texture;
class RenderTarget;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Base class for textured shapes with outline /// \brief Base class for textured shapes with outline

View File

@ -31,9 +31,12 @@
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
#include <array>
namespace sf namespace sf
{ {

View File

@ -29,18 +29,25 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/VertexArray.hpp> #include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/String.hpp> #include <SFML/System/String.hpp>
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
#include <cstddef>
#include <cstdint>
namespace sf namespace sf
{ {
class Font; class Font;
class RenderTarget;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Graphical text that can be drawn to a render target /// \brief Graphical text that can be drawn to a render target

View File

@ -34,15 +34,17 @@
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/System/Vector2.hpp>
#include <filesystem> #include <filesystem>
#include <cstddef>
#include <cstdint>
namespace sf namespace sf
{ {
class InputStream; class InputStream;
class RenderTarget;
class RenderTexture;
class Text;
class Window; class Window;
class Image; class Image;

View File

@ -29,6 +29,8 @@
#include <array> #include <array>
#include <cstddef>
namespace sf namespace sf
{ {

View File

@ -32,13 +32,18 @@
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/PrimitiveType.hpp> #include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
#include <vector> #include <vector>
#include <cstddef>
namespace sf namespace sf
{ {
class RenderTarget;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Define a set of one or more 2D primitives /// \brief Define a set of one or more 2D primitives
/// ///

View File

@ -31,6 +31,7 @@
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/PrimitiveType.hpp> #include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>

View File

@ -34,6 +34,7 @@
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <iosfwd>
#include <map> #include <map>
#include <optional> #include <optional>
#include <string> #include <string>

View File

@ -36,6 +36,8 @@
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <cstdint>
namespace sf namespace sf
{ {

View File

@ -39,8 +39,6 @@
namespace sf namespace sf
{ {
class String; class String;
class TcpSocket;
class UdpSocket;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Utility class to build blocks of data to transfer /// \brief Utility class to build blocks of data to transfer

View File

@ -34,8 +34,6 @@
namespace sf namespace sf
{ {
class SocketSelector;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Base class for all the socket types /// \brief Base class for all the socket types
/// ///

View File

@ -37,6 +37,7 @@
#include <vector> #include <vector>
#include <cstddef> #include <cstddef>
#include <cstdint>
namespace sf namespace sf

View File

@ -36,6 +36,7 @@
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <cstdint>
#include <cstdio> #include <cstdio>
#ifdef SFML_SYSTEM_ANDROID #ifdef SFML_SYSTEM_ANDROID

View File

@ -34,7 +34,7 @@
#include <SFML/System/InputStream.hpp> #include <SFML/System/InputStream.hpp>
#include <cstddef> #include <cstddef>
#include <cstdlib> #include <cstdint>
namespace sf namespace sf

View File

@ -34,6 +34,7 @@
#include <locale> #include <locale>
#include <string> #include <string>
#include <cstddef>
#include <cstdint> #include <cstdint>

View File

@ -27,6 +27,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/String.hpp> // NOLINT(misc-header-include-cycle) #include <SFML/System/String.hpp> // NOLINT(misc-header-include-cycle)
#include <iterator>
namespace sf namespace sf
{ {

View File

@ -31,8 +31,6 @@
#include <vector> #include <vector>
#include <cstdint>
using VkInstance = struct VkInstance_T*; using VkInstance = struct VkInstance_T*;
@ -43,6 +41,9 @@ using VkSurfaceKHR = struct VkSurfaceKHR_T*;
#else #else
#include <cstdint>
using VkSurfaceKHR = std::uint64_t; using VkSurfaceKHR = std::uint64_t;
#endif #endif

View File

@ -30,12 +30,16 @@
#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/Window/WindowEnums.hpp>
#include <SFML/Window/WindowHandle.hpp>
#include <SFML/System/Clock.hpp> #include <SFML/System/Clock.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <memory> #include <memory>
#include <cstdint>
namespace sf namespace sf
{ {
@ -44,8 +48,6 @@ namespace priv
class GlContext; class GlContext;
} }
struct Event;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Window that serves as a target for OpenGL rendering /// \brief Window that serves as a target for OpenGL rendering
/// ///

View File

@ -38,6 +38,8 @@
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <cstdint>
namespace sf namespace sf
{ {

View File

@ -37,6 +37,7 @@
#include <algorithm> #include <algorithm>
#include <ostream> #include <ostream>
#include <utility>
namespace sf namespace sf

View File

@ -36,8 +36,8 @@
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <exception> #include <exception>
#include <memory>
#include <ostream> #include <ostream>
#include <utility>
#if defined(__APPLE__) #if defined(__APPLE__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"

View File

@ -30,9 +30,12 @@
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/InputStream.hpp> #include <SFML/System/InputStream.hpp>
#include <algorithm>
#include <ostream> #include <ostream>
#include <cassert> #include <cassert>
#include <cstddef>
#include <cstdint>
namespace namespace

View File

@ -31,8 +31,16 @@
#include <FLAC/stream_decoder.h> #include <FLAC/stream_decoder.h>
#include <memory> #include <memory>
#include <optional>
#include <vector> #include <vector>
#include <cstdint>
namespace sf
{
class InputStream;
}
namespace sf::priv namespace sf::priv
{ {

View File

@ -48,7 +48,9 @@
#include <SFML/Audio/SoundFileReader.hpp> #include <SFML/Audio/SoundFileReader.hpp>
#include <vector> #include <optional>
#include <cstdint>
namespace sf::priv namespace sf::priv

View File

@ -28,12 +28,12 @@
#include <SFML/Audio/SoundFileReaderOgg.hpp> #include <SFML/Audio/SoundFileReaderOgg.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/MemoryInputStream.hpp> #include <SFML/System/InputStream.hpp>
#include <ostream> #include <ostream>
#include <cassert> #include <cassert>
#include <cctype> #include <cstdio>
namespace namespace

View File

@ -31,6 +31,15 @@
#include <vorbis/vorbisfile.h> #include <vorbis/vorbisfile.h>
#include <optional>
#include <cstdint>
namespace sf
{
class InputStream;
}
namespace sf::priv namespace sf::priv
{ {

View File

@ -31,11 +31,9 @@
#include <SFML/System/InputStream.hpp> #include <SFML/System/InputStream.hpp>
#include <SFML/System/Utils.hpp> #include <SFML/System/Utils.hpp>
#include <algorithm>
#include <ostream> #include <ostream>
#include <cassert> #include <cassert>
#include <cctype>
#include <cstddef> #include <cstddef>
#include <cstring> #include <cstring>

View File

@ -29,6 +29,15 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/SoundFileReader.hpp> #include <SFML/Audio/SoundFileReader.hpp>
#include <optional>
#include <cstdint>
namespace sf
{
class InputStream;
}
namespace sf::priv namespace sf::priv
{ {

View File

@ -33,9 +33,6 @@
#include <algorithm> #include <algorithm>
#include <ostream> #include <ostream>
#include <cassert>
#include <cctype>
namespace sf::priv namespace sf::priv
{ {

View File

@ -34,6 +34,8 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <cstdint>
namespace sf::priv namespace sf::priv
{ {

View File

@ -35,7 +35,6 @@
#include <random> #include <random>
#include <cassert> #include <cassert>
#include <cctype>
namespace sf::priv namespace sf::priv

View File

@ -34,6 +34,8 @@
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>
#include <cstdint>
namespace sf::priv namespace sf::priv
{ {

View File

@ -32,6 +32,8 @@
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>
#include <cstdint>
namespace sf::priv namespace sf::priv
{ {

View File

@ -27,7 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/CircleShape.hpp> #include <SFML/Graphics/CircleShape.hpp>
#include <cmath> #include <SFML/System/Angle.hpp>
namespace sf namespace sf

View File

@ -26,8 +26,8 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Font.hpp> #include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/Image.hpp> #include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/Texture.hpp>
#ifdef SFML_SYSTEM_ANDROID #ifdef SFML_SYSTEM_ANDROID
#include <SFML/System/Android/ResourceStream.hpp> #include <SFML/System/Android/ResourceStream.hpp>
#endif #endif
@ -41,11 +41,11 @@
#include FT_OUTLINE_H #include FT_OUTLINE_H
#include FT_BITMAP_H #include FT_BITMAP_H
#include FT_STROKER_H #include FT_STROKER_H
#include <ostream> #include <ostream>
#include <type_traits> #include <utility>
#include <cmath> #include <cmath>
#include <cstdlib>
#include <cstring> #include <cstring>
@ -759,8 +759,7 @@ bool Font::setCurrentSize(unsigned int characterSize) const
// fail if the requested size is not available // fail if the requested size is not available
if (!FT_IS_SCALABLE(face)) if (!FT_IS_SCALABLE(face))
{ {
err() << "Failed to set bitmap font size to " << characterSize << std::endl; err() << "Failed to set bitmap font size to " << characterSize << '\n' << "Available sizes are: ";
err() << "Available sizes are: ";
for (int i = 0; i < face->num_fixed_sizes; ++i) for (int i = 0; i < face->num_fixed_sizes; ++i)
{ {
const long size = (face->available_sizes[i].y_ppem + 32) >> 6; const long size = (face->available_sizes[i].y_ppem + 32) >> 6;

View File

@ -26,7 +26,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Glsl.hpp> #include <SFML/Graphics/Glsl.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <algorithm> #include <algorithm>

View File

@ -40,8 +40,10 @@
#include <stb_image_write.h> #include <stb_image_write.h>
#include <algorithm> #include <algorithm>
#include <iomanip>
#include <memory> #include <memory>
#include <ostream> #include <ostream>
#include <string>
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>

View File

@ -27,8 +27,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Graphics/RectangleShape.hpp>
#include <cmath>
namespace sf namespace sf
{ {

View File

@ -27,8 +27,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/RenderStates.hpp> #include <SFML/Graphics/RenderStates.hpp>
#include <cstddef>
namespace sf namespace sf
{ {

View File

@ -31,7 +31,6 @@
#include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Shader.hpp> #include <SFML/Graphics/Shader.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/VertexArray.hpp>
#include <SFML/Graphics/VertexBuffer.hpp> #include <SFML/Graphics/VertexBuffer.hpp>
#include <SFML/Window/Context.hpp> #include <SFML/Window/Context.hpp>
@ -39,7 +38,6 @@
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <algorithm> #include <algorithm>
#include <iostream>
#include <mutex> #include <mutex>
#include <ostream> #include <ostream>
#include <unordered_map> #include <unordered_map>

View File

@ -34,6 +34,8 @@
#include <memory> #include <memory>
#include <ostream> #include <ostream>
#include <cassert>
namespace sf namespace sf
{ {

View File

@ -31,13 +31,15 @@
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/System/Vector2.hpp>
#include <memory> #include <memory>
namespace sf namespace sf
{ {
class Context; class Context;
struct ContextSettings;
namespace priv namespace priv
{ {

View File

@ -28,15 +28,14 @@
#include <SFML/Graphics/GLCheck.hpp> #include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp> #include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/RenderTextureImplFBO.hpp> #include <SFML/Graphics/RenderTextureImplFBO.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Window/Context.hpp> #include <SFML/Window/Context.hpp>
#include <SFML/Window/ContextSettings.hpp> #include <SFML/Window/ContextSettings.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <mutex>
#include <ostream> #include <ostream>
#include <utility>
namespace sf::priv namespace sf::priv

View File

@ -31,14 +31,18 @@
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/System/Vector2.hpp>
#include <memory> #include <memory>
#include <unordered_map> #include <unordered_map>
#include <cstdint>
namespace sf namespace sf
{ {
class Context; class Context;
struct ContextSettings;
namespace priv namespace priv
{ {

View File

@ -30,7 +30,6 @@
#include <SFML/Graphics/Image.hpp> #include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/RenderTextureImplFBO.hpp> #include <SFML/Graphics/RenderTextureImplFBO.hpp>
#include <SFML/Graphics/RenderWindow.hpp> #include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Window/VideoMode.hpp> #include <SFML/Window/VideoMode.hpp>

View File

@ -26,18 +26,18 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/GLCheck.hpp> #include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp> #include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/Shader.hpp> #include <SFML/Graphics/Shader.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <SFML/Window/Context.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/InputStream.hpp> #include <SFML/System/InputStream.hpp>
#include <SFML/System/Utils.hpp> #include <SFML/System/Utils.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/System/Vector3.hpp>
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
@ -45,6 +45,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <cstdint>
#ifndef SFML_OPENGL_ES #ifndef SFML_OPENGL_ES
#if defined(SFML_SYSTEM_MACOS) || defined(SFML_SYSTEM_IOS) #if defined(SFML_SYSTEM_MACOS) || defined(SFML_SYSTEM_IOS)

View File

@ -31,6 +31,9 @@
#include <algorithm> #include <algorithm>
#include <cassert>
#include <cstddef>
namespace namespace
{ {
// Compute the normal of a segment // Compute the normal of a segment

View File

@ -29,7 +29,7 @@
#include <SFML/Graphics/Sprite.hpp> #include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <cassert> #include <cmath>
#include <cstdlib> #include <cstdlib>

View File

@ -34,6 +34,8 @@
#include <utility> #include <utility>
#include <cmath> #include <cmath>
#include <cstddef>
#include <cstdint>
namespace namespace

View File

@ -42,7 +42,6 @@
#include <utility> #include <utility>
#include <cassert> #include <cassert>
#include <climits>
#include <cstring> #include <cstring>

View File

@ -25,10 +25,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLExtensions.hpp> #include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/TextureSaver.hpp> #include <SFML/Graphics/TextureSaver.hpp>
namespace sf::priv namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -27,7 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp> #include <SFML/Graphics/GLExtensions.hpp>
namespace sf::priv namespace sf::priv

View File

@ -39,6 +39,7 @@
#include <cstddef> #include <cstddef>
#include <cstring> #include <cstring>
namespace namespace
{ {
// A nested named namespace is used here to allow unity builds of SFML. // A nested named namespace is used here to allow unity builds of SFML.

View File

@ -27,6 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/View.hpp> #include <SFML/Graphics/View.hpp>
#include <cassert>
#include <cmath> #include <cmath>

View File

@ -30,11 +30,13 @@
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <algorithm>
#include <fstream> #include <fstream>
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
#include <utility> #include <utility>
#include <cctype>
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
@ -532,7 +534,7 @@ Ftp::Response Ftp::DataChannel::open(Ftp::TransferMode mode)
for (unsigned char& datum : data) for (unsigned char& datum : data)
{ {
// Extract the current number // Extract the current number
while (isdigit(str[index])) while (std::isdigit(str[index]))
{ {
datum = static_cast<std::uint8_t>( datum = static_cast<std::uint8_t>(
static_cast<std::uint8_t>(datum * 10) + static_cast<std::uint8_t>(str[index] - '0')); static_cast<std::uint8_t>(datum * 10) + static_cast<std::uint8_t>(str[index] - '0'));

View File

@ -30,10 +30,15 @@
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/Utils.hpp> #include <SFML/System/Utils.hpp>
#include <algorithm>
#include <iterator> #include <iterator>
#include <limits> #include <limits>
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
#include <utility>
#include <cctype>
#include <cstddef>
namespace sf namespace sf

View File

@ -31,7 +31,6 @@
#include <istream> #include <istream>
#include <ostream> #include <ostream>
#include <utility>
#include <cstring> #include <cstring>

View File

@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Socket.hpp> #include <SFML/Network/Socket.hpp>
#include <SFML/Network/SocketHandle.hpp>
#if defined(SFML_SYSTEM_WINDOWS) #if defined(SFML_SYSTEM_WINDOWS)

View File

@ -31,7 +31,6 @@
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <algorithm>
#include <memory> #include <memory>
#include <ostream> #include <ostream>
#include <utility> #include <utility>
@ -120,7 +119,8 @@ void SocketSelector::add(Socket& socket)
} }
// SocketHandle is an int in POSIX // SocketHandle is an int in POSIX
m_impl->maxSocket = std::max(m_impl->maxSocket, handle); if (m_impl->maxSocket < handle)
m_impl->maxSocket = handle;
#endif #endif

View File

@ -33,7 +33,6 @@
#include <ostream> #include <ostream>
#include <cerrno> #include <cerrno>
#include <cstring>
namespace sf::priv namespace sf::priv

View File

@ -33,6 +33,7 @@
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
#include <cwchar>
namespace sf namespace sf

View File

@ -32,6 +32,8 @@
#include <filesystem> #include <filesystem>
#include <string> #include <string>
#include <cstddef>
namespace sf namespace sf
{ {

View File

@ -31,6 +31,7 @@
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <ostream> #include <ostream>
#include <utility>
namespace namespace

View File

@ -26,6 +26,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/Context.hpp> #include <SFML/Window/Context.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/GlContext.hpp> #include <SFML/Window/GlContext.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>

View File

@ -31,7 +31,8 @@
#include <SFML/Window/Context.hpp> #include <SFML/Window/Context.hpp>
#include <SFML/Window/ContextSettings.hpp> #include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/GlResource.hpp>
#include <SFML/System/Vector2.hpp>
#include <memory> #include <memory>

View File

@ -32,6 +32,12 @@
#include <SFML/Window/Keyboard.hpp> #include <SFML/Window/Keyboard.hpp>
#include <SFML/Window/Mouse.hpp> #include <SFML/Window/Mouse.hpp>
namespace sf
{
class WindowBase;
}
namespace sf::priv::InputImpl namespace sf::priv::InputImpl
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -29,8 +29,11 @@
#include <SFML/Window/Unix/VulkanImplX11.hpp> #include <SFML/Window/Unix/VulkanImplX11.hpp>
#include <dlfcn.h> #include <dlfcn.h>
#include <map> #include <string_view>
#include <string> #include <vector>
#include <cstdint>
#define VK_USE_PLATFORM_XLIB_KHR #define VK_USE_PLATFORM_XLIB_KHR
#define VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES
#include <vulkan.h> #include <vulkan.h>

View File

@ -29,6 +29,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/VideoMode.hpp> #include <SFML/Window/VideoMode.hpp>
#include <vector>
namespace sf::priv namespace sf::priv
{ {

View File

@ -31,6 +31,9 @@
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
#include <cstdint>
namespace sf::priv namespace sf::priv
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -32,6 +32,9 @@
#include <SFML/System/String.hpp> #include <SFML/System/String.hpp>
#include <SFML/System/Win32/WindowsHeader.hpp> #include <SFML/System/Win32/WindowsHeader.hpp>
#include <optional>
namespace namespace
{ {
sf::priv::EnumArray<sf::Keyboard::Key, sf::Keyboard::Scancode, sf::Keyboard::KeyCount> keyToScancodeMapping; ///< Mapping from Key to Scancode sf::priv::EnumArray<sf::Keyboard::Key, sf::Keyboard::Scancode, sf::Keyboard::KeyCount> keyToScancodeMapping; ///< Mapping from Key to Scancode

View File

@ -42,7 +42,6 @@
#include <vector> #include <vector>
#include <cmath> #include <cmath>
#include <cstring>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -29,8 +29,10 @@
#include <SFML/System/Win32/WindowsHeader.hpp> #include <SFML/System/Win32/WindowsHeader.hpp>
#include <map>
#include <string_view> #include <string_view>
#include <cstdint>
#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>

View File

@ -25,16 +25,20 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/VideoMode.hpp>
#include <SFML/Window/Win32/WglContext.hpp> #include <SFML/Window/Win32/WglContext.hpp>
#include <SFML/Window/WindowImpl.hpp> #include <SFML/Window/WindowImpl.hpp>
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
#include <SFML/System/String.hpp>
#include <mutex> #include <mutex>
#include <ostream>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <cassert>
// We check for this definition in order to avoid multiple definitions of GLAD // We check for this definition in order to avoid multiple definitions of GLAD
// entities during unity builds of SFML. // entities during unity builds of SFML.
#ifndef SF_GLAD_WGL_IMPLEMENTATION_INCLUDED #ifndef SF_GLAD_WGL_IMPLEMENTATION_INCLUDED

Some files were not shown because too many files have changed in this diff Show More