mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
canvas: just use stack and size counter instead of std::vector<>
This commit is contained in:
parent
9925147aae
commit
b3854c2e92
1 changed files with 7 additions and 6 deletions
|
|
@ -225,15 +225,16 @@ struct FourDimensions {
|
|||
/* CSS style defaults: see https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties
|
||||
*/
|
||||
|
||||
std::vector<Distance> args;
|
||||
Distance args[4];
|
||||
uint32_t nargs = 1;
|
||||
|
||||
args.push_back (u);
|
||||
args[0] = u;
|
||||
|
||||
if (r >= 0) { args.push_back (r); }
|
||||
if (d >= 0) { args.push_back (d); }
|
||||
if (l >= 0) { args.push_back (l); }
|
||||
if (r >= 0) { args[1] = r; ++nargs; }
|
||||
if (d >= 0) { args[2] = d; ++nargs; }
|
||||
if (l >= 0) { args[3] = l; ++nargs; }
|
||||
|
||||
switch (args.size()) {
|
||||
switch (nargs) {
|
||||
case 1:
|
||||
up = right = down = left = args[0];
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue