Cppcheck false positive? (eg 'PropEntry::operator=' should return 'PropEntry &')

Kohei Yoshida kohei.yoshida at gmail.com
Thu Dec 27 10:36:37 PST 2012

On Thu, Dec 27, 2012 at 9:53 AM, julien2412 <serval2412 at yahoo.fr> wrote:

> Hello,
> Cppcheck reports this kind of thing:
> [sd/source/filter/ppt/propread.hxx:116]: (style) 'PropEntry::operator='
> should return 'PropEntry &'.
>     116     const PropEntry& operator=(const PropEntry& rPropEntry);
> Indeed, I understand this cppcheck report, if you assign a variable, the
> result can't be considered as "const".

Yes, the assignment operator should always return a non-const reference of
self.  Cppcheck is correct on this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20121227/a7e28892/attachment.html>

More information about the LibreOffice mailing list