backends/native: Update MetaBezier coding style for modern standards

Let's try to get past that pesky code-style checker.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3399>
This commit is contained in:
Peter Hutterer 2023-12-15 11:40:07 +10:00 committed by Marge Bot
parent 414357a70f
commit f2ed377f48

View File

@ -64,18 +64,18 @@ struct _MetaBezier
* bezier coefficients -- these are calculated using multiplication and
* addition from integer input, so these are also integers
*/
gint ax;
gint bx;
gint cx;
gint dx;
int ax;
int bx;
int cx;
int dx;
gint ay;
gint by;
gint cy;
gint dy;
int ay;
int by;
int cy;
int dy;
/* length of the bezier */
guint length;
unsigned int length;
};
MetaBezier *
@ -93,8 +93,9 @@ meta_bezier_free (MetaBezier * b)
}
}
static gint
meta_bezier_t2x (const MetaBezier * b, _FixedT t)
static int
meta_bezier_t2x (const MetaBezier *b,
_FixedT t)
{
/*
* NB -- the int coefficients can be at most 8192 for the multiplication
@ -104,8 +105,9 @@ meta_bezier_t2x (const MetaBezier * b, _FixedT t)
+ b->dx;
}
static gint
meta_bezier_t2y (const MetaBezier * b, _FixedT t)
static int
meta_bezier_t2y (const MetaBezier *b,
_FixedT t)
{
/*
* NB -- the int coefficients can be at most 8192 for the multiplication
@ -277,7 +279,7 @@ meta_bezier_init (MetaBezier *b,
int x = meta_bezier_t2x (b, t);
int y = meta_bezier_t2y (b, t);
guint l = sqrti ((y - yp)*(y - yp) + (x - xp)*(x - xp));
unsigned int l = sqrti ((y - yp) * (y - yp) + (x - xp) * (x - xp));
l += length[i - 1];