diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-03 08:55:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-03 08:56:01 +0100 |
commit | 24a89b277208d8f3fa7987f5fe76a02286bbff25 (patch) | |
tree | 706fcecaac450eba86b29ac75ee36973e0f4a37b | |
parent | 8acdf876c52240c5f3c6d428162b15d4e89f32a7 (diff) |
Improve loplugin:passstuffbyref
Change-Id: I88ab4c51ff59312127681d3087d22b9c79192b94
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 7 | ||||
-rw-r--r-- | drawinglayer/source/dumper/XShapeDumper.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentRedlineManager.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index 9eb076884805..6d98dbf90341 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -47,7 +47,10 @@ bool PassStuffByRef::VisitFunctionDecl(const FunctionDecl * functionDecl) { } // only warn on the definition/prototype of the function, // not on the function implementation - if (functionDecl->isThisDeclarationADefinition() && functionDecl->getPreviousDecl() != nullptr) { + if ((functionDecl->isThisDeclarationADefinition() + && functionDecl->getPreviousDecl() != nullptr) + || functionDecl->isDeleted()) + { return true; } // only consider base declarations, not overriden ones, or we warn on methods that @@ -95,7 +98,7 @@ bool PassStuffByRef::VisitLambdaExpr(const LambdaExpr * expr) { } bool PassStuffByRef::isFat(QualType type, std::string * name) { - if (!type->isClassType()) { + if (!type->isRecordType()) { return false; } *name = type.getUnqualifiedType().getCanonicalType().getAsString(); diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index c64ba81b7565..62c34709e1c1 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -131,7 +131,7 @@ void dumpMoveProtectAsAttribute(bool bMoveProtect, xmlTextWriterPtr xmlWriter); void dumpNameAsAttribute(const OUString& sName, xmlTextWriterPtr xmlWriter); void dumpSizeProtectAsAttribute(bool bSizeProtect, xmlTextWriterPtr xmlWriter); void dumpHomogenMatrixLine3(com::sun::star::drawing::HomogenMatrixLine3 aLine, xmlTextWriterPtr xmlWriter); -void dumpTransformationAsElement(com::sun::star::drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter); +void dumpTransformationAsElement(com::sun::star::drawing::HomogenMatrix3 const & aTransformation, xmlTextWriterPtr xmlWriter); void dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter); void dumpHyperlinkAsAttribute(const OUString& sHyperlink, xmlTextWriterPtr xmlWriter); void dumpInteropGrabBagAsElement(const uno::Sequence< beans::PropertyValue>& aInteropGrabBag, xmlTextWriterPtr xmlWriter); @@ -1031,7 +1031,7 @@ void dumpHomogenMatrixLine3(drawing::HomogenMatrixLine3 aHomogenMatrixLine3, xml xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column3"), "%f", aHomogenMatrixLine3.Column3); } -void dumpTransformationAsElement(drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter) +void dumpTransformationAsElement(drawing::HomogenMatrix3 const & aTransformation, xmlTextWriterPtr xmlWriter) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Transformation" )); { diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index c192cd3c412d..bc31678cafe5 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -119,7 +119,7 @@ using namespace com::sun::star; namespace { - static inline bool IsPrevPos( const SwPosition rPos1, const SwPosition rPos2 ) + static inline bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 ) { const SwCntntNode* pCNd; return 0 == rPos2.nContent.GetIndex() && diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 80c7ca13168b..22f0e993526e 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -169,7 +169,7 @@ namespace return aValue; } - libcmis::PropertyPtr lcl_unoToCmisProperty( document::CmisProperty prop ) + libcmis::PropertyPtr lcl_unoToCmisProperty( document::CmisProperty const & prop ) { libcmis::PropertyTypePtr propertyType( new libcmis::PropertyType( ) ); |