[librsvg/rustification] Make condition slightly easier to read
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] Make condition slightly easier to read
- Date: Sat, 12 Nov 2016 00:22:08 +0000 (UTC)
commit 1e12b148dec098f2f1d5d8edfd9e0317f5e9f4ba
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Nov 11 18:15:44 2016 -0600
Make condition slightly easier to read
rsvg-base.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 04b1df1..e766719 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1422,11 +1422,12 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
bbox.rect.x = bbox.rect.y = 0;
bbox.rect.width = bbox.rect.height = 1;
- if (!id && (root->w.unit == LENGTH_UNIT_PERCENT || root->h.unit == LENGTH_UNIT_PERCENT)
- && !root->vbox.active)
- handle_subelement = TRUE;
- else if (!id && root->w.length != -1 && root->h.length != -1)
- handle_subelement = FALSE;
+ if (!id) {
+ if ((root->w.unit == LENGTH_UNIT_PERCENT || root->h.unit == LENGTH_UNIT_PERCENT) &&
!root->vbox.active)
+ handle_subelement = TRUE;
+ else
+ handle_subelement = FALSE;
+ }
if (handle_subelement == TRUE) {
target = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]