filter/source/graphicfilter/icgm/elements.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 8718c42d3010e39564b588298a313e516388ce02 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Mar 10 09:55:42 2019 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sat Mar 16 06:41:30 2019 +0100 Help cppcheck on filter/icgm/elements + optimize a bit operator = cppcheck: Avoid 'operator=' should return reference to 'this' instance. Change-Id: Iac146fe31b2cebc8e4f4c74d79ad98625db04637 Reviewed-on: https://gerrit.libreoffice.org/69004 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/filter/source/graphicfilter/icgm/elements.cxx b/filter/source/graphicfilter/icgm/elements.cxx index 915edc363630..8061d399537a 100644 --- a/filter/source/graphicfilter/icgm/elements.cxx +++ b/filter/source/graphicfilter/icgm/elements.cxx @@ -34,6 +34,9 @@ CGMElements::~CGMElements() CGMElements& CGMElements::operator=( const CGMElements& rSource ) { + if (this == &rSource) + return *this; + sal_uInt32 nIndex; nVDCIntegerPrecision = rSource.nVDCIntegerPrecision; @@ -125,7 +128,7 @@ CGMElements& CGMElements::operator=( const CGMElements& rSource ) maHatchMap = rSource.maHatchMap; bSegmentCount = rSource.bSegmentCount; - return (*this); + return *this; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits