Use g_slice_dup

This saves some manual copying.
Pointed out in bug 667473.
This commit is contained in:
Matthias Clasen 2012-01-07 19:00:47 -05:00
parent 2b16ec9f14
commit 1e867a94a2

View File

@ -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);
}
/**