mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Use g_slice_dup
This saves some manual copying. Pointed out in bug 667473.
This commit is contained in:
parent
2b16ec9f14
commit
1e867a94a2
@ -71,15 +71,7 @@ G_DEFINE_BOXED_TYPE (GdkRGBA, gdk_rgba,
|
||||
GdkRGBA *
|
||||
gdk_rgba_copy (const GdkRGBA *rgba)
|
||||
{
|
||||
GdkRGBA *copy;
|
||||
|
||||
copy = g_slice_new (GdkRGBA);
|
||||
copy->red = rgba->red;
|
||||
copy->green = rgba->green;
|
||||
copy->blue = rgba->blue;
|
||||
copy->alpha = rgba->alpha;
|
||||
|
||||
return copy;
|
||||
return g_slice_dup (GdkRGBA, rgba);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user