[Libreoffice] Questions about ./sdext/source/minimizer/unodialog.cxx

Noel Power nopower at novell.com
Mon Nov 8 02:00:48 PST 2010


On Sun, 2010-11-07 at 12:33 -0600, Norbert Thiebaud wrote:
> On Sun, Nov 7, 2010 at 7:00 AM, julien <serval2412 at yahoo.fr> wrote:

> Ahh, welcome to the wonderful world of operator overload.
> >>= is not a right shift but instead, here, nMapWith get populated with the property (uno) value, converted to a int32.
> 
> and the if() can only be true if that value is not 0
> so here you have a false positive.


Are you sure? iirc  
bool operator >>= ( Any& theAny, SomeType& something ) // probably the
wrong signature but you know what I mean

returns true if it was able to successfully extract the value from the
'theAny' into 'something' so there is a possibility of a runtime divide
by zero ( and probably should be defensively coded around )


Noel



More information about the LibreOffice mailing list