From 2a775cad6fc4295e8b55d8094b586ea2f29208ba Mon Sep 17 00:00:00 2001 From: Tolik708 Date: Sun, 17 Dec 2023 19:28:58 +0200 Subject: [PATCH] Named typedef-ed structs Gave name to structs that were defined like anonymous struct with name given by typedef. Example 'typedef struct {...} Foo;' -> 'typedef struct Foo {...} Foo;' --- include/SDL3/SDL_atomic.h | 2 +- include/SDL3/SDL_guid.h | 2 +- include/SDL3/SDL_test_crc32.h | 2 +- include/SDL3/SDL_test_md5.h | 2 +- include/SDL3/SDL_test_random.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/SDL3/SDL_atomic.h b/include/SDL3/SDL_atomic.h index 849ccc244..c7e4e6c39 100644 --- a/include/SDL3/SDL_atomic.h +++ b/include/SDL3/SDL_atomic.h @@ -267,7 +267,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); * * It is a struct so people don't accidentally use numeric operations on it. */ -typedef struct { int value; } SDL_AtomicInt; +typedef struct SDL_AtomicInt { int value; } SDL_AtomicInt; /** * Set an atomic variable to a new value if it is currently an old value. diff --git a/include/SDL3/SDL_guid.h b/include/SDL3/SDL_guid.h index accb4d9a5..30abc2741 100644 --- a/include/SDL3/SDL_guid.h +++ b/include/SDL3/SDL_guid.h @@ -52,7 +52,7 @@ extern "C" { * GUIDs may be platform-dependent (i.e., the same device may report * different GUIDs on different operating systems). */ -typedef struct { +typedef struct SDL_GUID { Uint8 data[16]; } SDL_GUID; diff --git a/include/SDL3/SDL_test_crc32.h b/include/SDL3/SDL_test_crc32.h index a4103f5c2..07f89aba2 100644 --- a/include/SDL3/SDL_test_crc32.h +++ b/include/SDL3/SDL_test_crc32.h @@ -63,7 +63,7 @@ extern "C" { /** * Data structure for CRC32 (checksum) computation */ - typedef struct { + typedef struct SDLTest_Crc32Context { CrcUint32 crc32_table[256]; /* CRC table */ } SDLTest_Crc32Context; diff --git a/include/SDL3/SDL_test_md5.h b/include/SDL3/SDL_test_md5.h index 4aa06340b..06a6272bd 100644 --- a/include/SDL3/SDL_test_md5.h +++ b/include/SDL3/SDL_test_md5.h @@ -68,7 +68,7 @@ extern "C" { typedef Uint32 MD5UINT4; /* Data structure for MD5 (Message-Digest) computation */ - typedef struct { + typedef struct SDLTest_Md5Context { MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ MD5UINT4 buf[4]; /* scratch buffer */ unsigned char in[64]; /* input buffer */ diff --git a/include/SDL3/SDL_test_random.h b/include/SDL3/SDL_test_random.h index 5c3e84a8d..73088e138 100644 --- a/include/SDL3/SDL_test_random.h +++ b/include/SDL3/SDL_test_random.h @@ -56,7 +56,7 @@ extern "C" { /* * Context structure for the random number generator state. */ - typedef struct { + typedef struct SDLTest_RandomContext { unsigned int a; unsigned int x; unsigned int c;