loplugin:useuniqueptr in vcl
Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea Reviewed-on: https://gerrit.libreoffice.org/64877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -477,14 +477,15 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C
|
||||
// linked list
|
||||
if (parentName == "ScFunctionList" || parentName == "SwNodes"
|
||||
|| parentName == "SwUnoCursor" || parentName == "SortedResultSet"
|
||||
|| parentName == "Atom")
|
||||
|| parentName == "Atom" || parentName == "RegionBand" || parentName == "WMFWriter"
|
||||
|| parentName == "Scheduler" || parentName == "OpenGLContext")
|
||||
return;
|
||||
// manual ref counting
|
||||
if (parentName == "ScBroadcastAreaSlot")
|
||||
return;
|
||||
// complicated
|
||||
if (parentName == "SwFormatField" || parentName == "FontPropertyBox" || parentName == "SdFontPropertyBox"
|
||||
|| parentName == "SwHTMLParser")
|
||||
|| parentName == "SwHTMLParser" || parentName == "PDFWriterImpl")
|
||||
return;
|
||||
|
||||
if (functionDecl->getIdentifier())
|
||||
@@ -516,6 +517,12 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C
|
||||
// very dodgy
|
||||
if (name == "UCBStorage::OpenStorage_Impl")
|
||||
return;
|
||||
// complicated ownership
|
||||
if (name == "ParseCMAP" || name == "OpenGLSalBitmap::CreateTexture" || name == "X11SalGraphicsImpl::drawAlphaBitmap")
|
||||
return;
|
||||
// complicated delete
|
||||
if (name == "X11SalObject::CreateObject")
|
||||
return;
|
||||
}
|
||||
|
||||
report(
|
||||
|
Reference in New Issue
Block a user