Bug 40545 - McdAccount: use gboolean rather than this guint : 1 bullshit
Summary: McdAccount: use gboolean rather than this guint : 1 bullshit
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 05:24 UTC by Guillaume Desmottes
Modified: 2011-09-07 09:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
mcd-account: use proper gboolean rather than 1 bit to store boolean properties (1.23 KB, patch)
2011-09-01 05:27 UTC, Guillaume Desmottes
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.