reportdesign/source/core/sdr/UndoEnv.cxx | 6 ++---- reportdesign/source/ui/report/ReportController.cxx | 3 +-- reportdesign/source/ui/report/ReportControllerObserver.cxx | 6 ++---- sal/osl/unx/backtraceapi.cxx | 4 ++-- 4 files changed, 7 insertions(+), 12 deletions(-)
New commits: commit 554861a3e25c047f3b44e8154f80456985c83402 Author: Noel Grandin <[email protected]> AuthorDate: Mon Nov 11 22:04:03 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Nov 12 07:25:33 2024 +0100 clang-tidy: performance-unnecessary-copy-initialization in reportdesgn Change-Id: I00a0db4a3cd23ae757aa894f886f5b5a1a0359f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176435 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index a2cdddafbdae..649703a34f80 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -480,8 +480,7 @@ void OXUndoEnvironment::AddSection(const Reference< report::XSection > & _xSecti { uno::Reference<container::XChild> xChild = _xSection; m_pImpl->m_aSections.push_back(xChild); - Reference< XInterface > xInt(_xSection); - AddElement(xInt); + AddElement(_xSection); } catch(const uno::Exception&) { @@ -497,8 +496,7 @@ void OXUndoEnvironment::RemoveSection(const Reference< report::XSection > & _xSe { uno::Reference<container::XChild> xChild(_xSection); std::erase(m_pImpl->m_aSections, xChild); - Reference< XInterface > xInt(_xSection); - RemoveElement(xInt); + RemoveElement(_xSection); } catch(uno::Exception&){} } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index bc572efa2224..83e354df6ead 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -228,8 +228,7 @@ static void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs, } else { - uno::Reference<uno::XInterface> xInterface(xReportControlFormat); - _rControlsFormats.push_back(xInterface); + _rControlsFormats.push_back(xReportControlFormat); } if ( !_xWindow.is() ) diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index d693c1787116..892f79872b1e 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -150,8 +150,7 @@ void OXReportControllerObserver::AddSection(const uno::Reference< report::XSecti { uno::Reference<container::XChild> xChild = _xSection; m_aSections.push_back(xChild); - uno::Reference< uno::XInterface > xInt(_xSection); - AddElement(xInt); + AddElement(_xSection); } catch(const uno::Exception&) { @@ -167,8 +166,7 @@ void OXReportControllerObserver::RemoveSection(const uno::Reference< report::XSe { uno::Reference<container::XChild> xChild(_xSection); std::erase(m_aSections, xChild); - uno::Reference< uno::XInterface > xInt(_xSection); - RemoveElement(xInt); + RemoveElement(_xSection); } catch(uno::Exception&) { commit 16f6149a09945465c97525f521f11922b6a95138 Author: Noel Grandin <[email protected]> AuthorDate: Mon Nov 11 22:04:14 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Nov 12 07:25:22 2024 +0100 clang-tidy: performance-unnecessary-copy-initialization in sal Change-Id: I99d7b71b2e06c5fc016411c369b6e887a274ec4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176436 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index 008b5f5c7092..1a39af42afe8 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -169,8 +169,8 @@ void process_file_addr2line( const char* file, std::vector<FrameData>& frameData { // There should be two lines, first function name and second source file information. // If each of them starts with ??, it is invalid/unknown. - OString function = lines[linesPos]; - OString source = lines[linesPos+1]; + const OString& function = lines[linesPos]; + const OString& source = lines[linesPos+1]; linesPos += 2; if(function.isEmpty() || function.startsWith("??")) {
