[gtk+] c99ism: declaration in the mid of a block



commit 23506c0e44e9ebe84a2155aa62b0dd0122685c95
Author: Hans Breuer <hans breuer org>
Date:   Sun Jan 2 12:36:16 2011 +0100

    c99ism: declaration in the mid of a block

 tests/testcairo.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/tests/testcairo.c b/tests/testcairo.c
index f66d2d6..eaca7a8 100644
--- a/tests/testcairo.c
+++ b/tests/testcairo.c
@@ -121,11 +121,10 @@ on_draw (GtkWidget *widget,
 {
   cairo_surface_t *overlay, *punch, *circles;
   cairo_t *overlay_cr, *punch_cr, *circles_cr;
-  int width, height;
 
   /* Fill the background */
-  width = gtk_widget_get_allocated_width (widget);
-  height = gtk_widget_get_allocated_height (widget);
+  int width = gtk_widget_get_allocated_width (widget);
+  int height = gtk_widget_get_allocated_height (widget);
   double radius = 0.5 * (width < height ? width : height) - 10;
   double xc = width / 2.;
   double yc = height / 2.;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]