From 80e57c692c687785738a48d3452ecdd8c917b5a3 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Sun, 10 Jan 2010 20:58:32 +0100 Subject: [PATCH] [AdgLogo] Properly set the new extents Using the same algorithm but without removing the const declaration with a casting. This will avoid future problems with strict aliasing optimizations. --- adg/adg-logo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/adg/adg-logo.c b/adg/adg-logo.c index 871ce4dc..7f7b1fa2 100644 --- a/adg/adg-logo.c +++ b/adg/adg-logo.c @@ -345,20 +345,19 @@ arrange(AdgEntity *entity) { AdgLogoClass *logo_class; AdgLogoClassPrivate *data_class; - CpmlExtents *extents; const AdgMatrix *local; + CpmlExtents extents; logo_class = ADG_LOGO_GET_CLASS(entity); data_class = logo_class->data_class; - extents = (CpmlExtents *) adg_entity_get_extents(entity); local = adg_entity_get_local_matrix(entity); arrange_class(logo_class); - cpml_extents_copy(extents, &data_class->extents); + cpml_extents_copy(&extents, &data_class->extents); /* Apply the local matrix to the extents of this logo instance */ - cpml_pair_transform(&extents->org, local); - cpml_vector_transform(&extents->size, local); + cpml_extents_transform(&extents, local); + adg_entity_set_extents(entity, &extents); } static void -- 2.11.4.GIT