Merge lp:~chasedouglas/geis/subscription-flags into lp:geis

Proposed by Chase Douglas
Status: Merged
Merged at revision: 256
Proposed branch: lp:~chasedouglas/geis/subscription-flags
Merge into: lp:geis
Diff against target: 19 lines (+3/-2)
1 file modified
include/geis/geis.h (+3/-2)
To merge this branch: bzr merge lp:~chasedouglas/geis/subscription-flags
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Daniel d'Andrada (community) Approve
Review via email: mp+102920@code.launchpad.net

Description of the change

Typedef GeisSubscriptionFlags to an int instead of an enum. When attempting to set a flags variable with multiple flags OR'd together, the result is no longer equivalent to any specific value of the enum. This causes build errors on variable assignment when building withg++.

To post a comment you must log in.
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looks good to me.

review: Approve
Revision history for this message
Stephen M. Webb (bregma) wrote :

Given that the original code has GeisSubscriptionFlags as a typedef of type int (see ISO/IEC 9899:2011
6.7.2.2(3)), this change is a no-op except for being less idiomatic C.

Revision history for this message
Stephen M. Webb (bregma) wrote :

I see this fixes a GCC -fpermissive warning when built using C++. I will approve on that basis.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/geis/geis.h'
--- include/geis/geis.h 2012-04-19 13:05:29 +0000
+++ include/geis/geis.h 2012-04-20 19:19:43 +0000
@@ -1825,12 +1825,13 @@
1825 * If this flag is not set, a new gesture will be identified for each change in1825 * If this flag is not set, a new gesture will be identified for each change in
1826 * gesture class.1826 * gesture class.
1827 */1827 */
1828typedef enum GeisSubscriptionFlags1828enum
1829{1829{
1830 GEIS_SUBSCRIPTION_NONE = 0x0000,1830 GEIS_SUBSCRIPTION_NONE = 0x0000,
1831 GEIS_SUBSCRIPTION_GRAB = 0x0001,1831 GEIS_SUBSCRIPTION_GRAB = 0x0001,
1832 GEIS_SUBSCRIPTION_CONT = 0x00021832 GEIS_SUBSCRIPTION_CONT = 0x0002
1833} GeisSubscriptionFlags;1833};
1834typedef int GeisSubscriptionFlags;
18341835
1835/**1836/**
1836 * Creates a new subscription.1837 * Creates a new subscription.

Subscribers

People subscribed via source and target branches