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 _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice