mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Add modernize-deprecated-headers
This commit is contained in:
parent
7da9f1b93b
commit
dbfc62d2c0
|
@ -40,6 +40,7 @@ Checks: >
|
|||
-misc-non-private-member-variables-in-classes,
|
||||
-misc-static-assert,
|
||||
-misc-unused-parameters,
|
||||
modernize-deprecated-headers,
|
||||
modernize-loop-convert,
|
||||
modernize-make-unique,
|
||||
modernize-make-shared,
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
#include "hash_ctxt.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#include "system.h"
|
||||
#if !defined(CONF_PLATFORM_MACOS)
|
||||
|
@ -24,7 +24,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(CONF_FAMILY_UNIX)
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#include <sys/time.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
/* unix net includes */
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "../system.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
static int str_utf8_skeleton(int ch, const int **skeleton, int *skeleton_len)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "tolower_data.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <engine/shared/linereader.h>
|
||||
#include <engine/storage.h>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <base/detect.h>
|
||||
#include <base/math.h>
|
||||
#include <cmath>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_pixels.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <climits>
|
||||
#include <new>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <cstdarg>
|
||||
#include <tuple>
|
||||
|
||||
#include <base/hash_ctxt.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <engine/shared/image_manipulation.h>
|
||||
|
||||
#include <math.h> // cosf, sinf, log2f
|
||||
#include <cmath> // cosf, sinf, log2f
|
||||
|
||||
#if defined(CONF_VIDEORECORDER)
|
||||
#include "video.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <game/version.h>
|
||||
|
||||
#if !defined(CONF_FAMILY_WINDOWS)
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "serverbrowser_ping_cache.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits.h>
|
||||
#include <climits>
|
||||
|
||||
#include <base/hash_ctxt.h>
|
||||
#include <base/math.h>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <sqlite3.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
|
||||
class CServerBrowserPingCache : public IServerBrowserPingCache
|
||||
|
|
|
@ -21,7 +21,7 @@ extern "C" {
|
|||
#include <opusfile.h>
|
||||
#include <wavpack.h>
|
||||
}
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <engine/storage.h>
|
||||
#include <game/version.h>
|
||||
|
||||
#include <stdlib.h> // system
|
||||
#include <cstdlib> // system
|
||||
|
||||
using std::map;
|
||||
using std::string;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
|
||||
volatile sig_atomic_t InterruptSignaled = 0;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <engine/shared/config.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
#include <stdio.h> // sscanf
|
||||
#include <cstdio> // sscanf
|
||||
|
||||
#include <base/system.h>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <base/hash_ctxt.h>
|
||||
#include <engine/shared/packer.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
static const CUuid TEEWORLDS_NAMESPACE = {{// "e05ddaaa-c4e6-4cfb-b642-5d48e80c0029"
|
||||
0xe0, 0x5d, 0xda, 0xaa, 0xc4, 0xe6, 0x4c, 0xfb,
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <base/tl/sorted_array.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <game/generated/client_data.h>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <base/tl/array.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <base/math.h>
|
||||
#include <base/system.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* (c) Redix and Sushi */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
|
||||
#include <base/system.h>
|
||||
#include <engine/serverbrowser.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <base/math.h>
|
||||
#include <base/system.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
|
||||
#include <limits.h>
|
||||
#include <climits>
|
||||
|
||||
#include <engine/demo.h>
|
||||
#include <engine/graphics.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include <list>
|
||||
|
||||
#include <base/math.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <base/math.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
#include <base/math.h>
|
||||
#include <engine/graphics.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "render.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <engine/kernel.h>
|
||||
#include <engine/map.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <game/collision.h>
|
||||
#include <game/layers.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdio.h> // sscanf
|
||||
#include <cinttypes>
|
||||
#include <cstdio> // sscanf
|
||||
|
||||
#include <engine/console.h>
|
||||
#include <engine/shared/linereader.h>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <game/collision.h>
|
||||
#include <game/gamecore.h>
|
||||
#include <game/version.h>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
#include <game/generated/protocol7.h>
|
||||
#include <game/generated/protocolglue.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <steam/steam_api_flat.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <engine/shared/config.h>
|
||||
#include <engine/shared/network.h>
|
||||
#include <mastersrv/mastersrv.h>
|
||||
#include <stdlib.h> //rand
|
||||
#include <cstdlib> //rand
|
||||
|
||||
CNetServer *pNet;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <engine/shared/image_manipulation.h>
|
||||
#include <engine/storage.h>
|
||||
#include <game/mapitems.h>
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
Loading…
Reference in a new issue