On Thursday 27 of December 2012, Julien Nabet wrote:
But there are still these:
[lingucomponent/source/languageguessing/simpleguesser.hxx:43]: (style)
'SimpleGuesser::operator=' should return 'SimpleGuesser &'.
[reportdesign/source/filter/xml/xmlComponent.hxx:37]: (style)
'OXMLComponent::operator=' should return 'OXMLComponent &'.
[reportdesign/source/filter/xml/xmlFunction.hxx:41]: (style)
'OXMLFunction::operator=' should return 'OXMLFunction &'.
[reportdesign/source/filter/xml/xmlGroup.hxx:38]: (style)
'OXMLGroup::operator=' should return 'OXMLGroup &'.
[reportdesign/source/filter/xml/xmlCell.hxx:41]: (style)
'OXMLCell::operator=' should return 'OXMLCell &'.
All except first one, return an object instead of a ref to an object. I
don't know if I can't just put "&" or if it should be investigated.
http://courses.cms.caltech.edu/cs11/material/cpp/donnie/cpp-ops.html
But there's of course a small chance that whoever wrote the operator=
incorrectly not only didn't know how to do it right but also wrote it in a
way that cleaning it up will uncover another problem (I'm pretty sure I've
run into such one already).
First one isn't an assignment but a comparison! Isn't it a little
dangerous?
No idea what you mean.
--
Lubos Lunak
l.lunak@suse.cz
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.