Use g_slice_dup
This saves some manual copying. Pointed out in bug 667473.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user