summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-12 16:39:03 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-18 07:37:31 +0000
commit789055bc2acb4c71483fd60ea258d158bd5aec10 (patch)
tree7849de841a71f667a30b2a971ad0c3d406110396 /connectivity
parent150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff)
clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/predicateinput.cxx8
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx4
2 files changed, 4 insertions, 8 deletions
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 29119e7da367..c32f225c0436 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -279,13 +279,11 @@ namespace dbtools
OUString sReturn;
if ( _rxField.is() )
{
- OUString sValue( _rPredicateValue );
-
// The following is mostly stolen from the former implementation in the parameter dialog
// (dbaccess/source/ui/dlg/paramdialog.cxx). I do not fully understand this .....
OUString sError;
- OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
+ OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, _rxField );
implParseNode(pParseNode, true) >>= sReturn;
}
@@ -353,13 +351,11 @@ namespace dbtools
if ( _rxField.is() )
{
- OUString sValue( _rPredicateValue );
-
// The following is mostly stolen from the former implementation in the parameter dialog
// (dbaccess/source/ui/dlg/paramdialog.cxx). I do not fully understand this .....
OUString sError;
- OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
+ OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, _rxField );
return implParseNode(pParseNode, false);
}
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index c034f1613520..688da518f2fb 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -382,7 +382,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
OSL_ENSURE( ( _rError.getErrorCondition() == 0 ),
"OConnection::throwSQLException: unsupported error code combination!" );
- OUString sParameter( _rError.getParameter() );
+ const OUString& sParameter( _rError.getParameter() );
if ( !sParameter.isEmpty() )
{
const OUString sError( getResources().getResourceStringWithSubstitution(
@@ -400,7 +400,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
if ( _rError.getErrorCondition() != 0 )
{
SQLError aErrorHelper( comphelper::getComponentContext(getDriver()->getFactory()) );
- OUString sParameter( _rError.getParameter() );
+ const OUString& sParameter( _rError.getParameter() );
if ( !sParameter.isEmpty() )
aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter );
else