Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi guys,

        I see quite a staggering number of these things around the codebase:

$ g grep '== sal_True' | wc -l
744

        and the (less dangerous IMHO) '== sal_False' construct has ~400 (what
positive people we are ;-)

if( m_pDataContainer->IsModuleInstalled( E_SWRITER ) == sal_True )
if( IsModified() == sal_True )
if( m_bOwner == sal_True )
etc. etc.

        sal_True is -1 - which is great for unsigned bit fields and all that -
but - well, I am certain there are a whole host of creative errors
around where a supposedly boolean value is neither 0 nor -1, and of
course these create serious trouble were we to convert to using plain
'bool' more widely.

        The question is - are others concerned about this, and/or should we
have a (very) easy hack to fix it ?

        Thoughts ?

                Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.