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;'

main
Tolik708 2023-12-17 19:28:58 +02:00 committed by Sam Lantinga
parent 37d066b99b
commit 2a775cad6f
5 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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;