diff options
author | offtkp <parisoplop@gmail.com> | 2022-03-28 13:25:36 +0300 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-03-29 13:34:30 +0200 |
commit | f54ed0bcaac5d41ad7ef9946b07094db369b3cb9 (patch) | |
tree | 71c8e646d8f13ed0f606631c915c3263f04898d8 /chart2 | |
parent | 64888968b30fb387d8c2536664117915e5423b0c (diff) |
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 <hossein@libreoffice.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/Splines.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
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 |