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:

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, 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
1=== modified file 'include/geis/geis.h'
2--- include/geis/geis.h 2012-04-19 13:05:29 +0000
3+++ include/geis/geis.h 2012-04-20 19:19:43 +0000
4@@ -1825,12 +1825,13 @@
5 * If this flag is not set, a new gesture will be identified for each change in
6 * gesture class.
7 */
8-typedef enum GeisSubscriptionFlags
10 {
14-} GeisSubscriptionFlags;
16+typedef int GeisSubscriptionFlags;
18 /**
19 * Creates a new subscription.


People subscribed via source and target branches