Header include clean-up and minor refactoring

This commit is contained in:
vittorioromeo 2024-02-03 22:05:48 +01:00 committed by Vittorio Romeo
parent eb07e1e6c5
commit 368ff9dace
16 changed files with 21 additions and 13 deletions

View File

@ -35,6 +35,7 @@
#include <memory>
#include <cstddef>
#include <cstdint>
namespace sf

View File

@ -35,6 +35,8 @@
#include <filesystem>
#include <vector>
#include <cstdint>
namespace sf
{

View File

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

View File

@ -36,7 +36,8 @@
#include <mutex>
#include <thread>
#include <cstdlib>
#include <cstddef>
#include <cstdint>
namespace sf

View File

@ -58,7 +58,7 @@ InputSoundFile::StreamDeleter::StreamDeleter(const std::default_delete<T>&)
void InputSoundFile::StreamDeleter::operator()(InputStream* ptr) const
{
if (owned)
std::default_delete<InputStream>{}(ptr);
delete ptr;
}

View File

@ -26,6 +26,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/System/Err.hpp>

View File

@ -29,8 +29,6 @@
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <filesystem>
#include <string_view>

View File

@ -27,6 +27,7 @@
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Shader.hpp>
#include <SFML/Graphics/Texture.hpp>

View File

@ -26,6 +26,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/RenderTextureImplDefault.hpp>
#include <SFML/Graphics/TextureSaver.hpp>

View File

@ -26,6 +26,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/RenderTextureImplFBO.hpp>
#include <SFML/Graphics/Texture.hpp>

View File

@ -26,6 +26,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/RenderTextureImplFBO.hpp>
#include <SFML/Graphics/RenderWindow.hpp>

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/Shader.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/Transform.hpp>

View File

@ -26,6 +26,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/TextureSaver.hpp>

View File

@ -25,6 +25,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/TextureSaver.hpp>

View File

@ -26,6 +26,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/Graphics/GLExtensions.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Vertex.hpp>
#include <SFML/Graphics/VertexBuffer.hpp>

View File

@ -30,15 +30,13 @@
#include <SFML/System/Err.hpp>
#include <algorithm>
#include <fstream>
#include <iterator>
#include <ostream>
#include <sstream>
#include <utility>
#include <cctype>
#include <cstdio>
#include <cstddef>
#include <cstdint>
namespace sf
@ -357,11 +355,7 @@ Ftp::Response Ftp::upload(const std::filesystem::path& localFile,
Ftp::Response Ftp::sendCommand(const std::string& command, const std::string& parameter)
{
// Build the command string
std::string commandStr;
if (!parameter.empty())
commandStr = command + " " + parameter + "\r\n";
else
commandStr = command + "\r\n";
const std::string commandStr = parameter.empty() ? command + "\r\n" : command + " " + parameter + "\r\n";
// Send it to the server
if (m_commandSocket.send(commandStr.c_str(), commandStr.length()) != Socket::Status::Done)