flood_fill_seed: Unify "left" and "x" vars
This reduces the memory usage a bit.
This commit is contained in:
parent
aad3fc63b6
commit
40def012e7
2 changed files with 4 additions and 5 deletions
|
@ -170,14 +170,14 @@ static void flood_fill_seed(struct quirc *q,
|
|||
|
||||
/* Set up the first context */
|
||||
next_vars = stack;
|
||||
next_vars->x = x0;
|
||||
next_vars->left = x0;
|
||||
next_vars->y = y0;
|
||||
|
||||
call:
|
||||
vars = next_vars;
|
||||
|
||||
/* Fill the extent */
|
||||
flood_fill_line(q, vars->x, vars->y, from, to, &vars->left,
|
||||
flood_fill_line(q, vars->left, vars->y, from, to, &vars->left,
|
||||
&vars->right);
|
||||
|
||||
if (func)
|
||||
|
@ -199,7 +199,7 @@ call:
|
|||
|
||||
/* Set up the next context */
|
||||
next_vars = vars + 1;
|
||||
next_vars->x = i;
|
||||
next_vars->left = i;
|
||||
next_vars->y = vars->y - 1;
|
||||
goto call;
|
||||
return_from_call1: ;
|
||||
|
@ -217,7 +217,7 @@ return_from_call1: ;
|
|||
|
||||
/* Set up the next context */
|
||||
next_vars = vars + 1;
|
||||
next_vars->x = i;
|
||||
next_vars->left = i;
|
||||
next_vars->y = vars->y + 1;
|
||||
goto call;
|
||||
return_from_call2: ;
|
||||
|
|
|
@ -78,7 +78,6 @@ struct quirc_grid {
|
|||
};
|
||||
|
||||
struct quirc_flood_fill_vars {
|
||||
int x;
|
||||
int y;
|
||||
int right;
|
||||
int left;
|
||||
|
|
Loading…
Reference in a new issue