Skip to content
  • ricea's avatar
    Re-enable PRESUBMIT check for empty unique_ptr<> rvalue · e3646b0b
    ricea authored
    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=
    
    Review-Url: https://codereview.chromium.org/2311783002
    Cr-Commit-Position: refs/heads/master@{#416865}
    e3646b0b