diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-16 15:23:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-17 08:25:47 +0200 |
commit | ccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch) | |
tree | 2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /unoidl | |
parent | da5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff) |
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer
Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd
Reviewed-on: https://gerrit.libreoffice.org/61837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/sourcefileprovider.cxx | 2 | ||||
-rw-r--r-- | unoidl/source/unoidl-check.cxx | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/unoidl/source/sourcefileprovider.cxx b/unoidl/source/sourcefileprovider.cxx index ba46df1b0f3c..5845dbbc0115 100644 --- a/unoidl/source/sourcefileprovider.cxx +++ b/unoidl/source/sourcefileprovider.cxx @@ -94,7 +94,7 @@ SourceFileProvider::SourceFileProvider( if (k == map->end()) { k = map->insert(std::make_pair(id, new Module)).first; } - Module& mod = dynamic_cast<Module&>(*k->second.get()); + Module& mod = dynamic_cast<Module&>(*k->second); map = &mod.map; } } diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx index 04c75fcf84d4..ec7a3fbe7e4f 100644 --- a/unoidl/source/unoidl-check.cxx +++ b/unoidl/source/unoidl-check.cxx @@ -178,8 +178,7 @@ void checkMap( ->createCursor()), ignoreUnpublished); } else { - bool pubA = dynamic_cast<unoidl::PublishableEntity &>(*entA.get()) - .isPublished(); + bool pubA = dynamic_cast<unoidl::PublishableEntity&>(*entA).isPublished(); if (!pubA && ignoreUnpublished) { continue; } @@ -196,9 +195,7 @@ void checkMap( << std::endl; std::exit(EXIT_FAILURE); } - if (pubA - && (!dynamic_cast<unoidl::PublishableEntity &>(*entB.get()) - .isPublished())) + if (pubA && (!dynamic_cast<unoidl::PublishableEntity&>(*entB).isPublished())) { std::cerr << "A published entity " << name << " is not published in B" |