Closed Bug 1405935 Opened 8 years ago Closed 8 years ago

Restyle nsPref*.cpp

Categories

(Core :: Preferences: Backend, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(2 files)

Following on from bug 1405908... Process: - Patch 1: Run clang-format to fix whitespace. - Patch 2: Do manual fix-ups -- braces, rename things, etc. -- and then finish with another clang-format. - Squash the patches together before landing.
Comment on attachment 8915456 [details] Bug 1405935 - Restyle nsPref*.cpp (clang-format). . https://reviewboard.mozilla.org/r/186656/#review191702 C/C++ static analysis found 4 defects in this patch. You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp` If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: modules/libpref/nsPrefBranch.cpp:949 (Diff revision 1) > > //---------------------------------------------------------------------------- > // nsPrefLocalizedString > //---------------------------------------------------------------------------- > > -nsPrefLocalizedString::nsPrefLocalizedString() > +nsPrefLocalizedString::nsPrefLocalizedString() {} Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default] nsPrefLocalizedString::nsPrefLocalizedString() {} ^ = default; ::: modules/libpref/nsPrefBranch.cpp:951 (Diff revision 1) > - > -nsPrefLocalizedString::~nsPrefLocalizedString() > -{ > -} > > +nsPrefLocalizedString::~nsPrefLocalizedString() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] nsPrefLocalizedString::~nsPrefLocalizedString() {} ^ = default; ::: modules/libpref/nsPrefBranch.cpp:1014 (Diff revision 1) > // nsRelativeFilePref > //---------------------------------------------------------------------------- > > NS_IMPL_ISUPPORTS(nsRelativeFilePref, nsIRelativeFilePref) > > -nsRelativeFilePref::nsRelativeFilePref() > +nsRelativeFilePref::nsRelativeFilePref() {} Warning: Use '= default' to define a trivial default constructor [clang-tidy: modernize-use-equals-default] nsRelativeFilePref::nsRelativeFilePref() {} ^ = default; ::: modules/libpref/nsPrefBranch.cpp:1016 (Diff revision 1) > > -nsRelativeFilePref::nsRelativeFilePref() > +nsRelativeFilePref::nsRelativeFilePref() {} > -{ > -} > > -nsRelativeFilePref::~nsRelativeFilePref() > +nsRelativeFilePref::~nsRelativeFilePref() {} Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default] nsRelativeFilePref::~nsRelativeFilePref() {} ^ = default;
Attachment #8915457 - Flags: review?(felipc) → review+
Comment on attachment 8915456 [details] Bug 1405935 - Restyle nsPref*.cpp (clang-format). . https://reviewboard.mozilla.org/r/186656/#review191988 Let's also do the changes suggested by the static analysis bot
Attachment #8915456 - Flags: review?(felipc) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Assignee: nobody → n.nethercote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: