mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
This commit is contained in:
committed by
Michael Steenbeek
parent
431c2a4e74
commit
55979a3fff
@@ -43,7 +43,7 @@ struct HttpRequest2
|
||||
void * Tag = nullptr;
|
||||
std::string Method;
|
||||
std::string Url;
|
||||
http_data_type Type;
|
||||
HTTP_DATA_TYPE Type;
|
||||
bool ForceIPv4 = false;
|
||||
size_t Size = 0;
|
||||
union
|
||||
@@ -105,17 +105,17 @@ struct HttpRequest2
|
||||
}
|
||||
};
|
||||
|
||||
typedef struct read_buffer {
|
||||
struct read_buffer {
|
||||
char *ptr;
|
||||
size_t length;
|
||||
size_t position;
|
||||
} read_buffer;
|
||||
};
|
||||
|
||||
typedef struct write_buffer {
|
||||
struct write_buffer {
|
||||
char *ptr;
|
||||
size_t length;
|
||||
size_t capacity;
|
||||
} write_buffer;
|
||||
};
|
||||
|
||||
void http_init()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user