commit | a008b0fa8bbb2ff8578a132cbae84fa847a2ad23 | [log] [tgz] |
---|---|---|
author | John Stiles <johnstiles@google.com> | Sun Aug 16 08:48:02 2020 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Sun Aug 16 15:56:48 2020 +0000 |
tree | d125723e6e74eeca01fe48fa8ff882e3d2c827b6 | |
parent | c1c3c6d70d326a27b7b9fa82203ff2db28043be7 [diff] |
Enable ClangTidy check readability-redundant-smartptr-get. To my surprise, this even works with homegrown smart pointers (such as SkTLazy). https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html Find and remove redundant calls to smart pointer’s .get() method. Examples: ptr.get()->Foo() ==> ptr->Foo() *ptr.get() ==> *ptr *ptr->get() ==> **ptr if (ptr.get() == nullptr) ... => if (ptr == nullptr) ... Change-Id: I8ff541e0229656b4d8e875c8053a7e6138302547 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310976 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>