From 3b48b3cc92c93911f61535d22a2c8731574ee51a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 15 Sep 2016 11:24:43 +0200 Subject: loplugin:singlevalfields in sc..vcl Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258 --- compilerplugins/clang/singlevalfields.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/singlevalfields.py b/compilerplugins/clang/singlevalfields.py index 47c4c0d806c1..403ccbcd03d7 100755 --- a/compilerplugins/clang/singlevalfields.py +++ b/compilerplugins/clang/singlevalfields.py @@ -38,15 +38,18 @@ for fieldInfo, assignValues in fieldAssignDict.iteritems(): continue if "?" in assignValues: continue - # if it contains anything other than this set, ignore it - if len(assignValues - set(["0", "1", "-1", "nullptr"])) > 0: - continue + #if len(assignValues - set(["0", "1", "-1", "nullptr"])) > 0: + # continue # ignore things which are locally declared but are actually redeclarations of things from 3rd party code - parentClass = fieldInfo[0] - if parentClass == "_mwmhints": + containingClass = fieldInfo[0] + if containingClass == "_mwmhints": continue # ignore things which are representations of on-disk structures - if parentClass in ["SEPr", "WW8Dop", ]: + if containingClass in ["SEPr", "WW8Dop", "BmpInfoHeader", "BmpFileHeader", "Exif::ExifIFD", + "sw::WW8FFData", "FFDataHeader", "INetURLHistory_Impl::head_entry"]: + continue + # Windows-only + if containingClass in ["SfxAppData_Impl", "sfx2::ImplDdeItem"]: continue v0 = fieldInfo[0] + " " + fieldInfo[1] v1 = (",".join(assignValues)) -- cgit v1.2.3