diff options
author | David Robillard <d@drobilla.net> | 2016-07-31 18:02:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-07-31 18:02:55 -0400 |
commit | 43f43d5e73ba1c36199998bd90ea511efe0eac62 (patch) | |
tree | 5499adcfc2690f4c49d63738e23af9fecc79fa6b /src/boilerplate.h | |
parent | f0ce0f3142eef6442e2be8c8c0f202ccb713cf92 (diff) | |
download | ganv-43f43d5e73ba1c36199998bd90ea511efe0eac62.tar.gz ganv-43f43d5e73ba1c36199998bd90ea511efe0eac62.tar.bz2 ganv-43f43d5e73ba1c36199998bd90ea511efe0eac62.zip |
Fix compilation with C++
Diffstat (limited to 'src/boilerplate.h')
-rw-r--r-- | src/boilerplate.h | 9 |
1 files changed, 3 insertions, 6 deletions
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; \ } |