[libgxps] Declare variables at the top of the block
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] Declare variables at the top of the block
- Date: Thu, 12 Jan 2017 20:32:46 +0000 (UTC)
commit b82e9dbe95e307fb9483bdeaba88fddf695b8ee6
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Wed Jan 4 10:39:54 2017 +0100
Declare variables at the top of the block
This fixes the build with old version of visual studio
libgxps/gxps-page.c | 4 +++-
libgxps/gxps-path.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libgxps/gxps-page.c b/libgxps/gxps-page.c
index ad4a4e0..dc43f6e 100644
--- a/libgxps/gxps-page.c
+++ b/libgxps/gxps-page.c
@@ -777,12 +777,14 @@ render_end_element (GMarkupParseContext *context,
if (path->opacity_mask) {
gdouble x1 = 0, y1 = 0, x2 = 0, y2 = 0;
+ cairo_path_t *cairo_path;
+
if (path->stroke_pattern)
cairo_stroke_extents (ctx->cr, &x1, &y1, &x2, &y2);
else if (path->fill_pattern)
cairo_fill_extents (ctx->cr, &x1, &y1, &x2, &y2);
- cairo_path_t *cairo_path = cairo_copy_path (ctx->cr);
+ cairo_path = cairo_copy_path (ctx->cr);
cairo_new_path (ctx->cr);
cairo_rectangle (ctx->cr, x1, y1, x2 - x1, y2 - y1);
cairo_clip (ctx->cr);
diff --git a/libgxps/gxps-path.c b/libgxps/gxps-path.c
index 2b2b99d..e67ab39 100644
--- a/libgxps/gxps-path.c
+++ b/libgxps/gxps-path.c
@@ -879,12 +879,14 @@ path_geometry_end_element (GMarkupParseContext *context,
if (path->opacity_mask) {
gdouble x1 = 0, y1 = 0, x2 = 0, y2 = 0;
+ cairo_path_t *cairo_path;
+
if (path->stroke_pattern)
cairo_stroke_extents (path->ctx->cr, &x1, &y1, &x2, &y2);
else if (path->fill_pattern)
cairo_fill_extents (path->ctx->cr, &x1, &y1, &x2, &y2);
- cairo_path_t *cairo_path = cairo_copy_path (path->ctx->cr);
+ cairo_path = cairo_copy_path (path->ctx->cr);
cairo_new_path (path->ctx->cr);
cairo_rectangle (path->ctx->cr, x1, y1, x2 - x1, y2 - y1);
cairo_clip (path->ctx->cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]