chart2/source/view/charttypes/Splines.cxx |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit f54ed0bcaac5d41ad7ef9946b07094db369b3cb9
Author:     offtkp <parisop...@gmail.com>
AuthorDate: Mon Mar 28 13:25:36 2022 +0300
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Tue Mar 29 13:34:30 2022 +0200

    replace temporary value swap with std::swap
    
    Replaced 3 occurences of temporary value swap with
    C++ standard std::swap
    
    Change-Id: Ib4dea821da8e93e8d18a3ebe55a7e47a010c9de9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132194
    Tested-by: Jenkins
    Reviewed-by: Hossein <hoss...@libreoffice.org>

diff --git a/chart2/source/view/charttypes/Splines.cxx 
b/chart2/source/view/charttypes/Splines.cxx
index 2633f7798741..92e568eaca11 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -731,9 +731,6 @@ void SplineCalculater::CalculateBSplines(
         lcl_tSizeType c = 0; // true column index
         double fDivisor = 1.0; // used for diagonal element
         double fEliminate = 1.0; // used for the element, that will become zero
-        double fHelp;
-        tPointType aHelp;
-        lcl_tSizeType nHelp; // used in triangle change
         bool bIsSuccessful = true;
         for (c = 0 ; c <= n && bIsSuccessful; ++c)
         {
@@ -755,16 +752,10 @@ void SplineCalculater::CalculateBSplines(
                 {
                     for ( sal_uInt32 i = 0; i <= p ; ++i)
                     {
-                        fHelp = aMatN[r][i];
-                        aMatN[r][i] = aMatN[c][i];
-                        aMatN[c][i] = fHelp;
+                        std::swap( aMatN[r][i], aMatN[c][i] );
                     }
-                    aHelp = aPointsIn[r];
-                    aPointsIn[r] = aPointsIn[c];
-                    aPointsIn[c] = aHelp;
-                    nHelp = aShift[r];
-                    aShift[r] = aShift[c];
-                    aShift[c] = nHelp;
+                    std::swap( aPointsIn[r], aPointsIn[c] );
+                    std::swap( aShift[r], aShift[c] );
                 }
 
                 // divide row c, so that element(c,c) becomes 1

Reply via email to