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


On 11/03/2013 10:58 PM, julien2412 wrote:
Cppcheck reported some cases like this:
const Player& operator=( const Player& other );<--- 'Player::operator='
should return 'Player &'.

see http://dev-builds.libreoffice.org/cppcheck_reports/master/3.html#line-36

Here is the explanation about this choice from cppcheck guys:
https://sourceforge.net/apps/trac/cppcheck/wiki/QuestionsAndAnswers

Do you think we should apply this? Or perhaps there's no general rule?

There appears to be no good reason for the const in this particular case, and in general it should be hard to come by a case where there would be good reason to do so.

Stephan


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.