DescriptionRe-enable PRESUBMIT check for empty unique_ptr<> rvalue
ui/PRESUBMIT.py contained a check for constructing an empty unique_ptr<>
as an rvalue. It's almost always better to use nullptr instead. However, this
check was disabled because it was overly broad, matching things like
std::vector<std::unique_ptr<T>>()
which cannot be replaced by nullptr.
Make the check stricter so that it will not overmatch, and re-enable it.
Also fix some violations of the rule that were found during testing.
BUG=
Committed: https://crrev.com/e3646b0b4f464ac2a648ec228f04ec2cf86141de
Cr-Commit-Position: refs/heads/master@{#416865}
Patch Set 1 : Fix it for real #
Total comments: 4
Patch Set 2 : Remove obsolete TODO #
Depends on Patchset: Messages
Total messages: 15 (7 generated)
|