mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Header include clean-up and minor refactoring
This commit is contained in:
parent
eb07e1e6c5
commit
368ff9dace
@ -35,6 +35,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,8 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
|
@ -58,7 +58,7 @@ InputSoundFile::StreamDeleter::StreamDeleter(const std::default_delete<T>&)
|
|||||||
void InputSoundFile::StreamDeleter::operator()(InputStream* ptr) const
|
void InputSoundFile::StreamDeleter::operator()(InputStream* ptr) const
|
||||||
{
|
{
|
||||||
if (owned)
|
if (owned)
|
||||||
std::default_delete<InputStream>{}(ptr);
|
delete ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
|
|
||||||
#include <SFML/System/Err.hpp>
|
#include <SFML/System/Err.hpp>
|
||||||
|
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Config.hpp>
|
#include <SFML/Config.hpp>
|
||||||
|
|
||||||
#include <SFML/Graphics/GLExtensions.hpp>
|
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/Drawable.hpp>
|
#include <SFML/Graphics/Drawable.hpp>
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#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>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#include <SFML/Graphics/RenderTextureImplDefault.hpp>
|
#include <SFML/Graphics/RenderTextureImplDefault.hpp>
|
||||||
#include <SFML/Graphics/TextureSaver.hpp>
|
#include <SFML/Graphics/TextureSaver.hpp>
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#include <SFML/Graphics/RenderTextureImplFBO.hpp>
|
#include <SFML/Graphics/RenderTextureImplFBO.hpp>
|
||||||
#include <SFML/Graphics/Texture.hpp>
|
#include <SFML/Graphics/Texture.hpp>
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#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>
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/Color.hpp>
|
#include <SFML/Graphics/Color.hpp>
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.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/Graphics/Transform.hpp>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#include <SFML/Graphics/Image.hpp>
|
#include <SFML/Graphics/Image.hpp>
|
||||||
#include <SFML/Graphics/Texture.hpp>
|
#include <SFML/Graphics/Texture.hpp>
|
||||||
#include <SFML/Graphics/TextureSaver.hpp>
|
#include <SFML/Graphics/TextureSaver.hpp>
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#include <SFML/Graphics/TextureSaver.hpp>
|
#include <SFML/Graphics/TextureSaver.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Headers
|
// Headers
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
#include <SFML/Graphics/GLCheck.hpp>
|
#include <SFML/Graphics/GLCheck.hpp>
|
||||||
|
#include <SFML/Graphics/GLExtensions.hpp>
|
||||||
#include <SFML/Graphics/RenderTarget.hpp>
|
#include <SFML/Graphics/RenderTarget.hpp>
|
||||||
#include <SFML/Graphics/Vertex.hpp>
|
#include <SFML/Graphics/Vertex.hpp>
|
||||||
#include <SFML/Graphics/VertexBuffer.hpp>
|
#include <SFML/Graphics/VertexBuffer.hpp>
|
||||||
|
@ -30,15 +30,13 @@
|
|||||||
|
|
||||||
#include <SFML/System/Err.hpp>
|
#include <SFML/System/Err.hpp>
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iterator>
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <cctype>
|
#include <cstddef>
|
||||||
#include <cstdio>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
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)
|
Ftp::Response Ftp::sendCommand(const std::string& command, const std::string& parameter)
|
||||||
{
|
{
|
||||||
// Build the command string
|
// Build the command string
|
||||||
std::string commandStr;
|
const std::string commandStr = parameter.empty() ? command + "\r\n" : command + " " + parameter + "\r\n";
|
||||||
if (!parameter.empty())
|
|
||||||
commandStr = command + " " + parameter + "\r\n";
|
|
||||||
else
|
|
||||||
commandStr = command + "\r\n";
|
|
||||||
|
|
||||||
// Send it to the server
|
// Send it to the server
|
||||||
if (m_commandSocket.send(commandStr.c_str(), commandStr.length()) != Socket::Status::Done)
|
if (m_commandSocket.send(commandStr.c_str(), commandStr.length()) != Socket::Status::Done)
|
||||||
|
Loading…
Reference in New Issue
Block a user