mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Uniformly use floats in Actor properties
All the underlying implementation and the public entry points have been switched to floats; the only missing bits are the Actor properties that deal with positioning and sizing. This usually means a major pain when dealing with GValues and varargs functions. While GValue will warn you when dealing with the wrong conversions, varags will simply die an horrible (and hard to debug) death via segfault. Nothing much to do here, except warn people in the release notes and hope for the best.
This commit is contained in:
@ -265,8 +265,16 @@ clutter_interval_real_compute_value (ClutterInterval *interval,
|
||||
{
|
||||
gdouble ia, ib, res;
|
||||
|
||||
ia = g_value_get_double (initial);
|
||||
ib = g_value_get_double (final);
|
||||
if (value_type == G_TYPE_DOUBLE)
|
||||
{
|
||||
ia = g_value_get_double (initial);
|
||||
ib = g_value_get_double (final);
|
||||
}
|
||||
else
|
||||
{
|
||||
ia = g_value_get_float (initial);
|
||||
ib = g_value_get_float (final);
|
||||
}
|
||||
|
||||
res = (factor * (ib - ia)) + ia;
|
||||
|
||||
|
Reference in New Issue
Block a user