mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31: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 <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sf
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sf
|
||||
{
|
||||
|
@ -37,6 +37,9 @@
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sf
|
||||
{
|
||||
|
@ -36,7 +36,8 @@
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sf
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics/GLCheck.hpp>
|
||||
#include <SFML/Graphics/GLExtensions.hpp>
|
||||
|
||||
#include <SFML/System/Err.hpp>
|
||||
|
||||
|
@ -29,8 +29,6 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.hpp>
|
||||
|
||||
#include <SFML/Graphics/GLExtensions.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <string_view>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -25,6 +25,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics/GLExtensions.hpp>
|
||||
#include <SFML/Graphics/TextureSaver.hpp>
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user