cssnumbervalue: Move early-out code to GtkCssValue
These checks make sense for all css values.
This commit is contained in:
@@ -115,12 +115,6 @@ gtk_css_number_value_transition (GtkCssValue *start,
|
||||
{
|
||||
GtkCssValue *result, *mul_start, *mul_end;
|
||||
|
||||
if (progress == 0)
|
||||
return _gtk_css_value_ref (start);
|
||||
|
||||
if (progress == 1)
|
||||
return _gtk_css_value_ref (end);
|
||||
|
||||
if (start == end)
|
||||
return _gtk_css_value_ref (start);
|
||||
|
||||
|
||||
@@ -266,6 +266,9 @@ _gtk_css_value_transition (GtkCssValue *start,
|
||||
if (progress == 1)
|
||||
return _gtk_css_value_ref (end);
|
||||
|
||||
if (start == end)
|
||||
return _gtk_css_value_ref (start);
|
||||
|
||||
#ifdef CSS_VALUE_ACCOUNTING
|
||||
get_accounting_data (start->class->type_name)->transitioned++;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user