diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-21 07:51:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-01 08:26:24 +0200 |
commit | ed8152b1ed9baf859966fd21d6641dfba9c4467c (patch) | |
tree | b4f7b372433c5da3b8df41d026ff95fecece9ce6 /svx/source/form | |
parent | 6cb9b06432434fb3257118743780828b3b57326a (diff) |
improve loplugin:makeshared
to find places where we are converting stuff to unique_ptr
instead of using std::make_shared.
As a bonus, this tends to find places where we are using shared_ptr
where we can instead be using unique_ptr avoiding the locking overhead.
Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/formcontroller.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index f32789ceafd6..be6e956cc478 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -797,7 +797,7 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons OUString sFilterValue( condition->second ); OUString sErrorMsg, sCriteria; - const std::shared_ptr< OSQLParseNode > pParseNode = + const std::unique_ptr< OSQLParseNode > pParseNode = predicateTree( sErrorMsg, sFilterValue, xFormatter, xField ); OSL_ENSURE( pParseNode != nullptr, "FormController::getFastPropertyValue: could not parse the field value predicate!" ); if ( pParseNode != nullptr ) @@ -3112,7 +3112,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) { OUString sPredicate,sErrorMsg; rRefValue.Value >>= sPredicate; - std::shared_ptr< OSQLParseNode > pParseNode = predicateTree(sErrorMsg, sPredicate, xFormatter, xField); + std::unique_ptr< OSQLParseNode > pParseNode = predicateTree(sErrorMsg, sPredicate, xFormatter, xField); if ( pParseNode != nullptr ) { OUString sCriteria; |