About "assignment operators" cppcheck warning

julien2412 serval2412 at yahoo.fr
Sun Nov 3 13:58:01 PST 2013


Hello,

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?

Julien



--
View this message in context: http://nabble.documentfoundation.org/About-assignment-operators-cppcheck-warning-tp4081208.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list