1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Binpack function arguments together

Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
This commit is contained in:
clang-format
2018-07-21 13:51:54 +02:00
committed by Hielke Morsink
parent 95ce592579
commit b02dfdbc93
240 changed files with 20249 additions and 140534 deletions

View File

@@ -127,12 +127,8 @@ static int32_t cc_rides(InteractiveConsole& console, const utf8** argv, int32_t
char name[128];
format_string(name, 128, ride->name, &ride->name_arguments);
console.WriteFormatLine(
"ride: %03d type: %02u subtype %03u operating mode: %02u name: %s",
i,
ride->type,
ride->subtype,
ride->mode,
name);
"ride: %03d type: %02u subtype %03u operating mode: %02u name: %s", i, ride->type, ride->subtype,
ride->mode, name);
}
}
else if (strcmp(argv[0], "set") == 0)
@@ -592,14 +588,8 @@ static int32_t cc_get(InteractiveConsole& console, const utf8** argv, int32_t ar
LocationXY16 mapCoord = {};
rct_viewport* viewport = window_get_viewport(w);
get_map_coordinates_from_pos(
viewport->view_width / 2,
viewport->view_height / 2,
VIEWPORT_INTERACTION_MASK_TERRAIN,
&mapCoord.x,
&mapCoord.y,
&interactionType,
&tileElement,
nullptr);
viewport->view_width / 2, viewport->view_height / 2, VIEWPORT_INTERACTION_MASK_TERRAIN, &mapCoord.x,
&mapCoord.y, &interactionType, &tileElement, nullptr);
mapCoord.x -= 16;
mapCoord.x /= 32;
mapCoord.y -= 16;