Remove unused includes in drivers with clangd-tidy
This commit is contained in:
42 files changed
+61
-63
No files matched your search
@@ -33,10 +33,15 @@
|
||||
#ifdef ALSA_ENABLED
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/math/math_funcs_binary.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "asound-so_wrap.h"
|
||||
#else
|
||||
#include <alsa/asoundlib.h>
|
||||
#endif
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
#if defined(PULSEAUDIO_ENABLED) && defined(SOWRAP_ENABLED)
|
||||
|
||||
@@ -37,11 +37,8 @@
|
||||
#include "core/templates/safe_refcount.h"
|
||||
#include "servers/audio/audio_server.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "asound-so_wrap.h"
|
||||
#else
|
||||
#include <alsa/asoundlib.h>
|
||||
#endif
|
||||
typedef struct _snd_pcm snd_pcm_t;
|
||||
typedef unsigned long snd_pcm_uframes_t;
|
||||
|
||||
class AudioDriverALSA : public AudioDriver {
|
||||
Thread thread;
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
|
||||
#include "core/os/os.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "drivers/alsa/asound-so_wrap.h"
|
||||
#else
|
||||
#include <alsa/asoundlib.h>
|
||||
#endif
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
MIDIDriverALSAMidi::InputConnection::InputConnection(int p_device_index,
|
||||
|
||||
@@ -38,11 +38,7 @@
|
||||
#include "core/templates/safe_refcount.h"
|
||||
#include "core/templates/vector.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "../alsa/asound-so_wrap.h"
|
||||
#else
|
||||
#include <alsa/asoundlib.h>
|
||||
#endif
|
||||
typedef struct _snd_rawmidi snd_rawmidi_t;
|
||||
|
||||
class MIDIDriverALSAMidi : public MIDIDriver {
|
||||
Thread thread;
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
#include "os_log_logger.h"
|
||||
|
||||
#include "core/object/script_backtrace.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
#include <cstdio> // For vsnprintf.
|
||||
#include <cstdlib> // For malloc/free.
|
||||
|
||||
OsLogLogger::OsLogLogger(const char *p_subsystem) {
|
||||
const char *subsystem = p_subsystem;
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports.
|
||||
#import "app_delegate_service.h"
|
||||
#import "godot_app_delegate.h"
|
||||
#import "godot_view_apple_embedded.h"
|
||||
#import "godot_view_controller.h"
|
||||
// IWYU pragma: end_exports.
|
||||
@@ -39,7 +39,7 @@
|
||||
#if defined(VULKAN_ENABLED)
|
||||
#import "rendering_context_driver_vulkan_apple_embedded.h"
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
#endif // VULKAN_ENABLED
|
||||
|
||||
#if defined(METAL_ENABLED)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
#if defined(VULKAN_ENABLED)
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
#endif // VULKAN_ENABLED
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,9 +30,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
// FIXME: platform_gl.h includes windows.h via egl.h, which defines ConnectFlags.
|
||||
// This breaks include project_settings.h in config.cpp, so we include object.h first.
|
||||
#include "core/object/object.h"
|
||||
#include "core/object/object.h" // IWYU pragma: keep.
|
||||
|
||||
#include "platform_gl.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "servers/audio/audio_server.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "pulse-so_wrap.h"
|
||||
#include "pulse-so_wrap.h" // IWYU pragma: keep. Relies on pulseaudio.h transitive includes.
|
||||
#else
|
||||
#include <pulse/pulseaudio.h>
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#ifdef SDL_ENABLED
|
||||
|
||||
#include "core/input/default_controller_mappings.h"
|
||||
#include "core/os/time.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/thread.h"
|
||||
|
||||
typedef uint32_t SDL_JoystickID;
|
||||
typedef struct SDL_Joystick SDL_Joystick;
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#if defined(UNIX_ENABLED)
|
||||
|
||||
#include "core/os/memory.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/string/print_string.h"
|
||||
#include "core/templates/list.h"
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#include <cerrno>
|
||||
|
||||
#if defined(TOOLS_ENABLED)
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(UNIX_ENABLED)
|
||||
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/os/memory.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#if defined(UNIX_ENABLED)
|
||||
|
||||
class FileAccessUnix : public FileAccess {
|
||||
GDSOFTCLASS(FileAccessUnix, FileAccess);
|
||||
FILE *f = nullptr;
|
||||
|
||||
@@ -30,13 +30,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/os/memory.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#if defined(UNIX_ENABLED)
|
||||
|
||||
#include "core/io/file_access.h"
|
||||
|
||||
class FileAccessUnixPipe : public FileAccess {
|
||||
GDSOFTCLASS(FileAccessUnixPipe, FileAccess);
|
||||
bool unlink_on_close = false;
|
||||
|
||||
@@ -32,15 +32,18 @@
|
||||
|
||||
#ifdef UNIX_ENABLED
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/debugger/engine_debugger.h"
|
||||
#include "core/debugger/script_debugger.h"
|
||||
#include "drivers/unix/dir_access_unix.h"
|
||||
#include "drivers/unix/file_access_unix.h"
|
||||
#include "drivers/unix/file_access_unix_pipe.h"
|
||||
#include "drivers/unix/net_socket_unix.h"
|
||||
#include "drivers/unix/thread_posix.h"
|
||||
|
||||
#ifndef UNIX_SOCKET_UNAVAILABLE
|
||||
#include "drivers/unix/ip_unix.h"
|
||||
#include "drivers/unix/net_socket_unix.h"
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
#include <mach/host_info.h>
|
||||
@@ -77,7 +80,6 @@
|
||||
#include <unistd.h>
|
||||
#include <cerrno>
|
||||
#include <csignal>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#ifdef UNIX_ENABLED
|
||||
|
||||
#include "core/os/os.h"
|
||||
#include "drivers/unix/ip_unix.h"
|
||||
|
||||
#if defined(__GLIBC__) || defined(WEB_ENABLED)
|
||||
#include <iconv.h>
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
#include "syslog_logger.h"
|
||||
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
void SyslogLogger::logv(const char *p_format, va_list p_list, bool p_err) {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports.
|
||||
#ifdef USE_VOLK
|
||||
#include <volk.h>
|
||||
#else
|
||||
@@ -37,3 +38,4 @@
|
||||
#define VK_NO_STDINT_H
|
||||
#include <vulkan/vulkan.h>
|
||||
#endif
|
||||
// IWYU pragma: end_exports.
|
||||
@@ -32,15 +32,17 @@
|
||||
|
||||
#include "rendering_context_driver_vulkan.h"
|
||||
|
||||
#include "vk_enum_string_helper.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/version.h"
|
||||
#include "drivers/vulkan/rendering_device_driver_vulkan.h"
|
||||
#include "drivers/vulkan/vulkan_hooks.h"
|
||||
|
||||
#include "rendering_device_driver_vulkan.h"
|
||||
#include "vulkan_hooks.h"
|
||||
#ifndef DEV_ENABLED
|
||||
#include "core/os/os.h"
|
||||
#endif
|
||||
|
||||
#include <vk_enum_string_helper.h>
|
||||
|
||||
#if defined(VK_TRACK_DRIVER_MEMORY)
|
||||
/*************************************************/
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "servers/rendering/rendering_context_driver.h"
|
||||
|
||||
#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
|
||||
#if defined(DEBUG_ENABLED)
|
||||
#define VK_TRACK_DRIVER_MEMORY
|
||||
#define VK_TRACK_DEVICE_MEMORY
|
||||
#endif
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
class RenderingContextDriverVulkan : public RenderingContextDriver {
|
||||
public:
|
||||
|
||||
@@ -32,10 +32,9 @@
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/templates/fixed_vector.h"
|
||||
#include "vulkan_hooks.h"
|
||||
#include "drivers/vulkan/vulkan_hooks.h"
|
||||
|
||||
#include "thirdparty/misc/smolv.h"
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "thirdparty/re-spirv/re-spirv.h"
|
||||
#include "thirdparty/vulkan/vk_mem_alloc.h"
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
class FileAccess;
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
|
||||
#include "core/math/vector2i.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
class VulkanHooks {
|
||||
private:
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "audio_driver_wasapi.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
#include <functiondiscoverykeys.h>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "dir_access_windows.h"
|
||||
#include "file_access_windows.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include <share.h> // _SH_DENYNO
|
||||
#include <shlwapi.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <io.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#ifdef WINDOWS_ENABLED
|
||||
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/os/memory.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
|
||||
#include <winbase.h>
|
||||
|
||||
Error FileAccessWindowsPipe::open_existing(HANDLE p_rfd, HANDLE p_wfd, bool p_blocking) {
|
||||
// Open pipe using handles created by CreatePipe(rfd, wfd, NULL, 4096) call in the OS.execute_with_pipe.
|
||||
_close();
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#ifdef WINDOWS_ENABLED
|
||||
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/os/memory.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
@@ -32,14 +32,11 @@
|
||||
|
||||
#include "ip_windows.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#include <iphlpapi.h>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
static IPAddress _sockaddr2ip(struct sockaddr *p_addr) {
|
||||
IPAddress ip;
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "core/templates/vector.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#ifdef VULKAN_ENABLED
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
const char *RenderingContextDriverVulkanAndroid::_get_platform_surface_extension() const {
|
||||
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "rendering_context_driver_vulkan_wayland.h"
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
const char *RenderingContextDriverVulkanWayland::_get_platform_surface_extension() const {
|
||||
return VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "rendering_context_driver_vulkan_x11.h"
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
const char *RenderingContextDriverVulkanX11::_get_platform_surface_extension() const {
|
||||
return VK_KHR_XLIB_SURFACE_EXTENSION_NAME;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include "rendering_context_driver_vulkan_windows.h"
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
const char *RenderingContextDriverVulkanWindows::_get_platform_surface_extension() const {
|
||||
return VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
|
||||
|
||||
@@ -7,7 +7,7 @@ index 8026787ad4..7a54b12a38 100644
|
||||
#include <string>
|
||||
#endif
|
||||
-#include <vulkan/vulkan.h>
|
||||
+#include "drivers/vulkan/godot_vulkan.h"
|
||||
+#include <drivers/vulkan/godot_vulkan.h>
|
||||
static inline const char* string_VkResult(VkResult input_value) {
|
||||
switch (input_value) {
|
||||
case VK_SUCCESS:
|
||||
+1
-1
@@ -6,7 +6,7 @@ index 8df03649b5..42ba704beb 100644
|
||||
See documentation chapter: \ref statistics.
|
||||
*/
|
||||
|
||||
+#include "drivers/vulkan/godot_vulkan.h"
|
||||
+#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#ifdef __cplusplus
|
||||
#include <string>
|
||||
#endif
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
static inline const char* string_VkResult(VkResult input_value) {
|
||||
switch (input_value) {
|
||||
case VK_SUCCESS:
|
||||
|
||||
Vendored
+1
-1
@@ -123,7 +123,7 @@ for user-defined purpose without allocating any real GPU memory.
|
||||
See documentation chapter: \ref statistics.
|
||||
*/
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
#include <drivers/vulkan/godot_vulkan.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Reference in new issue
Block a user