From 43f43d5e73ba1c36199998bd90ea511efe0eac62 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 31 Jul 2016 18:02:55 -0400 Subject: Fix compilation with C++ --- src/boilerplate.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/boilerplate.h') diff --git a/src/boilerplate.h b/src/boilerplate.h index a6be001..17dd545 100644 --- a/src/boilerplate.h +++ b/src/boilerplate.h @@ -24,12 +24,9 @@ typedef gpointer gobject; #define SET_CASE(prop, type, field) \ case PROP_##prop: { \ const g##type tmp = g_value_get_##type(value); \ - if (field != tmp) { \ - field = tmp; \ - GanvItem* item = GANV_ITEM(object); \ - if (item->impl->canvas) { \ - ganv_item_request_update(item); \ - } \ + if ((field) != tmp) { \ + (field) = tmp; \ + ganv_item_request_update(GANV_ITEM(object)); \ } \ break; \ } -- cgit v1.2.1