Updated three Power Profile functions to match MSDN
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Apr 9 01:24:31 CDT 2008
"Black Dragon" <blackdragon1157 at gmail.com> wrote:
First of all Wine doesn't accept patches from an anonymous person,
please use your real name.
> + if(PowerCaps.SystemS4==TRUE && PowerCaps.HiberFilePresent==TRUE) { return TRUE; }
> + else return FALSE;
You should never compare against TRUE, and add braces only when necessary:
return PowerCaps.SystemS4 && PowerCaps.HiberFilePresent;
is much shorter and clearer.
> + if(PowerCaps.SystemS5==TRUE) { return TRUE; }
> + else return FALSE;
Same here:
return PowerCaps.SystemS5;
or
return PowerCaps.SystemS5 != 0;
> + if(PowerCaps.SystemS1==TRUE && PowerCaps.SystemS2==TRUE && PowerCaps.SystemS3==TRUE) { return true; }
> + else return FALSE;
Same here, also don't use 'true', it's not portable.
--
Dmitry.
More information about the wine-devel
mailing list