Bug 40545

Summary: McdAccount: use gboolean rather than this guint : 1 bullshit
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: mission-controlAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: mcd-account: use proper gboolean rather than 1 bit to store boolean properties

Description Guillaume Desmottes 2011-09-01 05:24:26 UTC
I just wasted 2 hours debugging a weird issue due to priv->enabled = enabled; (with enabled as a gboolean) not doing what you'd expect to.

I really don't see the point of using "guint enabled : 1" rather than gboolean. Gaining 7 bits (yeah!) is definitely not worth the extra headache.
Comment 1 Guillaume Desmottes 2011-09-01 05:27:43 UTC
Created attachment 50809 [details] [review]
mcd-account: use proper gboolean rather than 1 bit to store boolean properties

It doesn't make sense to not use the boolean type provided by our framework
and using 1 bit variable introduces weird corner case when being casted with
gboolean.
Comment 2 Will Thompson 2011-09-07 09:33:22 UTC
Merged, will be in 5.9.2.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.