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

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to