mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 00:04:43 +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
@@ -1179,11 +1179,11 @@ static size_t track_design_get_scenery_elements_count(rct_track_td6 *td6)
|
||||
return count;
|
||||
}
|
||||
|
||||
typedef struct auto_buffer {
|
||||
struct auto_buffer {
|
||||
void *ptr;
|
||||
size_t length;
|
||||
size_t capacity;
|
||||
} auto_buffer;
|
||||
};
|
||||
|
||||
static void auto_buffer_write(auto_buffer *buffer, const void *src, size_t len)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user