mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Core: Modernize C headers with C++ equivalents
This commit is contained in:
parent
a8ece29adc
commit
01fc9aee6c
101 changed files with 126 additions and 168 deletions
|
@ -46,8 +46,8 @@
|
|||
#include <dlfcn.h>
|
||||
#include <execinfo.h>
|
||||
#include <link.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
|
||||
static void handle_crash(int sig) {
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#ifdef DBUS_ENABLED
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
|
||||
class FreeDesktopScreenSaver {
|
||||
private:
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
|
||||
#include "main/main.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <climits>
|
||||
#include <clocale>
|
||||
#include <cstdlib>
|
||||
|
||||
#if defined(SANITIZERS_ENABLED)
|
||||
#include <sys/resource.h>
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
#include "core/os/os.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/input.h>
|
||||
#include <unistd.h>
|
||||
#include <cerrno>
|
||||
|
||||
#ifdef UDEV_ENABLED
|
||||
#ifdef SOWRAP_ENABLED
|
||||
|
|
|
@ -68,13 +68,12 @@
|
|||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#if __has_include(<mntent.h>)
|
||||
#include <mntent.h>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <stdlib.h> // alloca
|
||||
#include <cstdlib> // alloca
|
||||
// FreeBSD and OpenBSD use pthread_set_name_np, while other platforms,
|
||||
// include NetBSD, use pthread_setname_np. NetBSD's version however requires
|
||||
// a different format, we handle this directly in thread_posix.
|
||||
|
|
|
@ -36,13 +36,10 @@
|
|||
#include "core/string/print_string.h"
|
||||
#include "core/string/ustring.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdlib>
|
||||
|
||||
// To prevent shadowing warnings.
|
||||
#undef glGetString
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
#include "core/input/input.h"
|
||||
#include "servers/display_server.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
|
||||
#undef CursorShape
|
||||
|
||||
|
|
|
@ -46,11 +46,10 @@
|
|||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
|
|
|
@ -58,13 +58,12 @@
|
|||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#undef CursorShape
|
||||
#include <X11/XKBlib.h>
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
|
||||
#include "thirdparty/glad/glad/glx.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
const char *GLManagerEGL_X11::_get_platform_extension_name() const {
|
||||
return "EGL_KHR_platform_x11";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue