diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-23 16:36:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-24 07:18:44 +0100 |
commit | e5cfe9c050fbd601b64dc13fe6760e762a35a4d4 (patch) | |
tree | 8e98fba0391b0530295e0600963b333cafaa622c /connectivity/source/commontools | |
parent | b1d48a0e22bb8d2eabead41a6a6b53ffaec932e4 (diff) |
loplugin:makeshared in connectivity..cppuhelper
Change-Id: Id8064e961a64bb03bc0fb61e375cdcf769b340cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r-- | connectivity/source/commontools/RowFunctionParser.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/TTableHelper.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/commontools/sqlerror.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index e63e0e4a63b7..2246b7636797 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -386,7 +386,7 @@ private: const ParserContextSharedPtr& getParserContext() { - static ParserContextSharedPtr lcl_parserContext( new ParserContext ); + static ParserContextSharedPtr lcl_parserContext = std::make_shared<ParserContext>(); // clear node stack (since we reuse the static object, that's // the whole point here) diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 95ec25398600..d677887db1d4 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -374,7 +374,7 @@ void OTableHelper::refreshForeignKeys(::std::vector< OUString>& _rNames) m_pImpl->m_aKeys.emplace(sOldFKName,pKeyProps); const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::EComposeRule::InDataManipulation); - pKeyProps.reset(new sdbcx::KeyProperties(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule)); + pKeyProps = std::make_shared<sdbcx::KeyProperties>(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule); pKeyProps->m_aKeyColumnNames.push_back(sForeignKeyColumn); _rNames.push_back(sFkName); if ( m_pTables->hasByName(sReferencedName) ) @@ -555,7 +555,7 @@ std::shared_ptr<sdbcx::KeyProperties> OTableHelper::getKeyProperties(const OUStr else // only a fall back { OSL_FAIL("No key with the given name found"); - pKeyProps.reset(new sdbcx::KeyProperties()); + pKeyProps = std::make_shared<sdbcx::KeyProperties>(); } return pKeyProps; diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index f5dd3def56cd..db4c59f2f480 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -240,7 +240,7 @@ namespace connectivity } SQLError::SQLError() - :m_pImpl( new SQLError_Impl ) + :m_pImpl( std::make_shared<SQLError_Impl>() ) { } |