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


Hi Stephan,

On Mon, 2012-01-09 at 09:29 +0100, Stephan Bergmann wrote:

However, whether it actually would be an advantage to not have to 
address the other calls to GetAutoFormat, I am not sure.  After all, 
those calls that afterwards check for null-ness *are* dubious.

Indeed.  I've gotten used to seeing stuff like that, and I always check
the definition of the getter to see if I should check for NULL or not.
Having said that, that doesn't mean it's not beneficial to make it
explicit by way of method name.

I'm all for your proposed change which will undoubtedly improve the
readability of the code.

What I personally would do is, in case the method always returns a live
instance, I would have it return a reference instead of a pointer.  But
that's just a matter of taste, I think.  I'm fine with the way you're
proposing.

Best,

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc


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.