Review Request: kdesupport/cpptoxml krazy fixes: Check for C++ operators that should be 'const'.
David Faure
faure at kde.org
Wed Mar 31 23:02:15 BST 2010
On Monday 29 March 2010, Thiago Macieira wrote:
> Non-POD types, it may make sense to avoid having people use it for
> something that discards changes.
Yeah, but is that really the responsibility of that method? With this
argument, -any- method that returns a QString should make it const just in
case the caller writes someQString().push_back(foo)? This doesn't make sense
to me, it's really blaming the wrong code for the problem (the wrong code is
someQString().push_back(), not the signature of someQString()).
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
More information about the kde-core-devel
mailing list