[2/3] Fix readability-redundant-smartptr-get warnings
Commit Message
clang-tidy's readability-redundant-smartptr-get warning is triggered
when it detects a redundant "get" of various smart pointer types in
boolean context. This commit fixes these warnings.
* tools/kmidiff.cc (main): Remove redundant .get() when
testing smart pointers.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
tools/kmidiff.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -416,7 +416,7 @@ main(int argc, char* argv[])
file_type ftype = guess_file_type(opts.kernel_dist_root1);
if (ftype == FILE_TYPE_DIR)
{
- debug_info_root_dir = opts.di_root_path1.get()
+ debug_info_root_dir = opts.di_root_path1
? opts.di_root_path1.get()
: "";
@@ -443,7 +443,7 @@ main(int argc, char* argv[])
file_type ftype = guess_file_type(opts.kernel_dist_root2);
if (ftype == FILE_TYPE_DIR)
{
- debug_info_root_dir = opts.di_root_path2.get()
+ debug_info_root_dir = opts.di_root_path2
? opts.di_root_path2.get()
: "";
group2 =