Cleanup sf::err includes

This commit is contained in:
Vittorio Romeo 2022-02-16 02:20:58 +00:00 committed by Lukas Dürrenberger
parent 359fe9088c
commit 32ad019304
66 changed files with 84 additions and 19 deletions

View File

@ -29,7 +29,7 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Export.hpp>
#include <ostream>
#include <iosfwd>
namespace sf

View File

@ -28,6 +28,7 @@
#include <SFML/Audio/ALCheck.hpp>
#include <SFML/System/Err.hpp>
#include <string>
#include <ostream>
#if defined(__APPLE__)
#if defined(__clang__)

View File

@ -30,6 +30,7 @@
#include <SFML/Audio/Listener.hpp>
#include <SFML/System/Err.hpp>
#include <optional>
#include <ostream>
#if defined(__APPLE__)
#if defined(__clang__)

View File

@ -33,8 +33,8 @@
#include <SFML/System/MemoryInputStream.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <iostream>
#include <algorithm>
#include <ostream>
namespace sf

View File

@ -32,6 +32,7 @@
#include <fstream>
#include <algorithm>
#include <mutex>
#include <ostream>
#if defined(__APPLE__)
#if defined(__clang__)

View File

@ -34,6 +34,7 @@
#include <SFML/System/Err.hpp>
#include <SFML/System/Time.hpp>
#include <memory>
#include <ostream>
#if defined(__APPLE__)
#if defined(__clang__)

View File

@ -29,6 +29,7 @@
#include <SFML/System/Err.hpp>
#include <algorithm>
#include <iterator>
#include <ostream>
namespace sf

View File

@ -36,6 +36,7 @@
#include <SFML/System/FileInputStream.hpp>
#include <SFML/System/MemoryInputStream.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace

View File

@ -29,6 +29,7 @@
#include <SFML/System/InputStream.hpp>
#include <SFML/System/Err.hpp>
#include <cassert>
#include <ostream>
namespace

View File

@ -47,7 +47,6 @@
#include <SFML/Audio/SoundFileReaderMp3.hpp>
#include <SFML/System/MemoryInputStream.hpp>
#include <SFML/System/Err.hpp>
#include <algorithm>
#include <cstring>

View File

@ -30,6 +30,7 @@
#include <SFML/System/Err.hpp>
#include <cctype>
#include <cassert>
#include <ostream>
namespace

View File

@ -32,6 +32,7 @@
#include <cctype>
#include <cassert>
#include <cstring>
#include <ostream>
namespace

View File

@ -31,6 +31,7 @@
#include <algorithm>
#include <cctype>
#include <cassert>
#include <ostream>
namespace sf

View File

@ -29,6 +29,7 @@
#include <SFML/System/Err.hpp>
#include <SFML/System/Utils.hpp>
#include <algorithm>
#include <ostream>
#include <cctype>
#include <cstdlib>
#include <cassert>

View File

@ -28,6 +28,7 @@
#include <SFML/Audio/SoundFileWriterWav.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/System/Utils.hpp>
#include <ostream>
#include <cassert>

View File

@ -30,6 +30,7 @@
#include <SFML/Audio/ALCheck.hpp>
#include <SFML/System/Sleep.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
#include <cstring>
#include <cassert>

View File

@ -30,8 +30,9 @@
#include <SFML/Audio/ALCheck.hpp>
#include <SFML/System/Sleep.hpp>
#include <SFML/System/Err.hpp>
#include <cassert>
#include <mutex>
#include <ostream>
#include <cassert>
#ifdef _MSC_VER
#pragma warning(disable: 4355) // 'this' used in base member initializer list

View File

@ -40,6 +40,7 @@
#include FT_BITMAP_H
#include FT_STROKER_H
#include <type_traits>
#include <ostream>
#include <cstdlib>
#include <cstring>
#include <cmath>

View File

@ -28,6 +28,7 @@
#include <SFML/Graphics/GLCheck.hpp>
#include <SFML/System/Err.hpp>
#include <string>
#include <ostream>
namespace sf

View File

@ -37,6 +37,8 @@
#include <glad/gl.h>
#endif
#include <ostream>
#if !defined(GL_MAJOR_VERSION)
#define GL_MAJOR_VERSION 0x821B
#endif

View File

@ -32,6 +32,7 @@
#include <SFML/System/Android/ResourceStream.hpp>
#endif
#include <algorithm>
#include <ostream>
#include <cstring>

View File

@ -34,6 +34,7 @@
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image_write.h>
#include <iterator>
#include <ostream>
namespace

View File

@ -38,6 +38,7 @@
#include <iostream>
#include <mutex>
#include <unordered_map>
#include <ostream>
#include <cassert>

View File

@ -30,6 +30,7 @@
#include <SFML/Graphics/RenderTextureImplDefault.hpp>
#include <SFML/System/Err.hpp>
#include <memory>
#include <ostream>
namespace sf

View File

@ -36,6 +36,7 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <ostream>
namespace

View File

@ -37,6 +37,7 @@
#include <fstream>
#include <vector>
#include <mutex>
#include <ostream>
#ifndef SFML_OPENGL_ES

View File

@ -36,6 +36,7 @@
#include <cstring>
#include <climits>
#include <mutex>
#include <ostream>
namespace

View File

@ -32,6 +32,7 @@
#include <SFML/System/Err.hpp>
#include <mutex>
#include <utility>
#include <ostream>
#include <cstddef>
#include <cstring>

View File

@ -33,6 +33,7 @@
#include <fstream>
#include <iterator>
#include <sstream>
#include <ostream>
#include <cstdio>

View File

@ -31,6 +31,7 @@
#include <iterator>
#include <sstream>
#include <limits>
#include <ostream>
namespace sf

View File

@ -28,6 +28,7 @@
#include <SFML/Network/Socket.hpp>
#include <SFML/Network/SocketImpl.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace sf

View File

@ -31,6 +31,7 @@
#include <SFML/System/Err.hpp>
#include <algorithm>
#include <memory>
#include <ostream>
#include <utility>
#ifdef _MSC_VER

View File

@ -29,6 +29,7 @@
#include <SFML/Network/TcpSocket.hpp>
#include <SFML/Network/SocketImpl.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace sf

View File

@ -31,6 +31,7 @@
#include <SFML/Network/SocketImpl.hpp>
#include <SFML/System/Err.hpp>
#include <algorithm>
#include <ostream>
#include <cstring>
#ifdef _MSC_VER

View File

@ -30,6 +30,7 @@
#include <SFML/Network/Packet.hpp>
#include <SFML/Network/SocketImpl.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
#include <cstddef>

View File

@ -27,6 +27,7 @@
////////////////////////////////////////////////////////////
#include <SFML/Network/Unix/SocketImpl.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
#include <cerrno>
#include <cstring>
#include <fcntl.h>

View File

@ -28,6 +28,7 @@
#include <SFML/Window/Android/ClipboardImpl.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/System/String.hpp>
#include <ostream>
namespace sf

View File

@ -29,6 +29,7 @@
#include <SFML/System/Android/Activity.hpp>
#include <SFML/System/Err.hpp>
#include <mutex>
#include <ostream>
#include <jni.h>

View File

@ -31,6 +31,7 @@
#include <SFML/Window/Event.hpp>
#include <SFML/System/Err.hpp>
#include <mutex>
#include <ostream>
#include <android/looper.h>
// Define missing constants for older API levels

View File

@ -28,6 +28,7 @@
#include <SFML/Window/Context.hpp>
#include <SFML/Window/GlContext.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace

View File

@ -30,6 +30,7 @@
#include <SFML/System/Err.hpp>
#include <glad/egl.h>
#include <string>
#include <ostream>
namespace sf

View File

@ -31,6 +31,7 @@
#include <SFML/System/Err.hpp>
#include <SFML/System/Sleep.hpp>
#include <mutex>
#include <ostream>
#ifdef SFML_SYSTEM_ANDROID
#include <SFML/System/Android/Activity.hpp>
#endif

View File

@ -34,6 +34,7 @@
#include <memory>
#include <mutex>
#include <optional>
#include <ostream>
#include <string>
#include <unordered_map>
#include <utility>

View File

@ -29,6 +29,7 @@
#include <SFML/Window/OSX/HIDInputManager.hpp>
#include <SFML/System/Err.hpp>
#include <AppKit/AppKit.h>
#include <ostream>
namespace sf
{

View File

@ -32,6 +32,7 @@
#include <SFML/Window/OSX/InputImpl.hpp>
#include <SFML/Window/OSX/HIDInputManager.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
#import <SFML/Window/OSX/SFOpenGLView.h>
#import <AppKit/AppKit.h>

View File

@ -31,6 +31,7 @@
#include <SFML/Window/OSX/HIDInputManager.hpp>
#include <SFML/Window/OSX/HIDJoystickManager.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace

View File

@ -32,6 +32,7 @@
#include <SFML/System/Err.hpp>
#include <dlfcn.h>
#include <stdint.h>
#include <ostream>
#if defined(__APPLE__)
#if defined(__clang__)

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
#include <SFML/System/Err.hpp>
#include <SFML/Window/OSX/WindowImplCocoa.hpp>
#include <ostream>
#import <SFML/Window/OSX/SFApplication.h>
#import <SFML/Window/OSX/SFOpenGLView.h>

View File

@ -33,6 +33,7 @@
#include <SFML/System/Err.hpp>
#include <ApplicationServices/ApplicationServices.h>
#include <algorithm>
#include <ostream>
#import <SFML/Window/OSX/NSImage+raw.h>
#import <SFML/Window/OSX/Scaling.h>

View File

@ -30,6 +30,7 @@
#include <SFML/Window/OSX/cg_sf_conversion.hpp>
#include <SFML/System/Err.hpp>
#include <algorithm>
#include <ostream>
namespace sf
{

View File

@ -30,6 +30,7 @@
#include <SFML/Window/OSX/WindowImplCocoa.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/System/String.hpp>
#include <ostream>
#import <SFML/Window/OSX/cpp_objc_conversion.h>
#import <SFML/Window/OSX/Scaling.h>

View File

@ -27,6 +27,7 @@
////////////////////////////////////////////////////////////
#include <SFML/Window/SensorManager.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace sf

View File

@ -32,6 +32,7 @@
#include <SFML/System/Time.hpp>
#include <X11/Xatom.h>
#include <vector>
#include <ostream>
namespace

View File

@ -30,6 +30,7 @@
#include <X11/keysym.h>
#include <mutex>
#include <unordered_map>
#include <ostream>
#include <cassert>
#include <cstdlib>

View File

@ -31,6 +31,7 @@
#include <SFML/System/Err.hpp>
#include <mutex>
#include <vector>
#include <ostream>
// We check for this definition in order to avoid multiple definitions of GLAD
// entities during unity builds of SFML.

View File

@ -31,9 +31,10 @@
#include <libudev.h>
#include <unistd.h>
#include <fcntl.h>
#include <cerrno>
#include <vector>
#include <string>
#include <vector>
#include <ostream>
#include <cerrno>
#include <cstring>
namespace

View File

@ -31,6 +31,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include <algorithm>
#include <ostream>
namespace sf

View File

@ -49,11 +49,12 @@
#include <libgen.h>
#include <fcntl.h>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <cassert>
#include <mutex>
#include <ostream>
#include <string>
#include <vector>
#include <cassert>
#include <cstring>
#ifdef SFML_OPENGL_ES
#include <SFML/Window/EglContext.hpp>

View File

@ -28,7 +28,8 @@
#include <SFML/Window/Win32/ClipboardImpl.hpp>
#include <SFML/System/Win32/WindowsHeader.hpp>
#include <SFML/System/String.hpp>
#include <iostream>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace sf
@ -42,13 +43,13 @@ String ClipboardImpl::getString()
if (!IsClipboardFormatAvailable(CF_UNICODETEXT))
{
std::cerr << "Failed to get the clipboard data in Unicode format." << std::endl;
err() << "Failed to get the clipboard data in Unicode format." << std::endl;
return text;
}
if (!OpenClipboard(nullptr))
{
std::cerr << "Failed to open the Win32 clipboard." << std::endl;
err() << "Failed to open the Win32 clipboard." << std::endl;
return text;
}
@ -56,7 +57,7 @@ String ClipboardImpl::getString()
if (!clipboard_handle)
{
std::cerr << "Failed to get Win32 handle for clipboard content." << std::endl;
err() << "Failed to get Win32 handle for clipboard content." << std::endl;
CloseClipboard();
return text;
}
@ -74,13 +75,13 @@ void ClipboardImpl::setString(const String& text)
{
if (!OpenClipboard(nullptr))
{
std::cerr << "Failed to open the Win32 clipboard." << std::endl;
err() << "Failed to open the Win32 clipboard." << std::endl;
return;
}
if (!EmptyClipboard())
{
std::cerr << "Failed to empty the Win32 clipboard." << std::endl;
err() << "Failed to empty the Win32 clipboard." << std::endl;
return;
}

View File

@ -28,6 +28,7 @@
#include <SFML/Window/Win32/CursorImpl.hpp>
#include <SFML/System/Win32/WindowsHeader.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
#include <cstring>

View File

@ -32,11 +32,12 @@
#include <SFML/System/Time.hpp>
#include <tchar.h>
#include <regstr.h>
#include <cmath>
#include <cstring>
#include <ostream>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#include <cstring>

View File

@ -29,6 +29,7 @@
#include <SFML/Window/Win32/WglContext.hpp>
#include <SFML/System/Err.hpp>
#include <mutex>
#include <ostream>
#include <sstream>
#include <vector>

View File

@ -35,7 +35,9 @@
// expects lowercase, and a native compile on windows, whether via msvc
// or mingw-w64 addresses files in a case insensitive manner.
#include <dbt.h>
#include <ostream>
#include <vector>
#include <cstring>
// MinGW lacks the definition of some Win32 constants

View File

@ -30,6 +30,7 @@
#include <SFML/Window/WindowImpl.hpp>
#include <SFML/System/Sleep.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace sf

View File

@ -29,6 +29,7 @@
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/WindowImpl.hpp>
#include <SFML/System/Err.hpp>
#include <ostream>
namespace

View File

@ -35,6 +35,8 @@
#include <OpenGLES/EAGLDrawable.h>
#include <QuartzCore/CAEAGLLayer.h>
#include <dlfcn.h>
#include <ostream>
#if defined(__APPLE__)
#if defined(__clang__)