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


On Sun, 2010-11-07 at 12:33 -0600, Norbert Thiebaud wrote:
On Sun, Nov 7, 2010 at 7:00 AM, julien <serval2412@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


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.