diff options
author | Liu Hao <ianahao331@gmail.com> | 2022-08-15 00:11:55 +0800 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-08-23 10:45:41 +0200 |
commit | 3f284b6f12e3eb047398998b223663b38a9bfec8 (patch) | |
tree | 2ab2974b217af76f37a38fdf34f7e5703d974f09 /chart2/source/view/main/PlottingPositionHelper.cxx | |
parent | 27892a5e12dada80226f778ab2bd14b1bdaab58a (diff) |
tdf#148251 Use std::swap instead of using temporary values
Change-Id: Ibbc46bfb17d4d27dc40e63c65190b3f3a5f2d9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138256
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'chart2/source/view/main/PlottingPositionHelper.cxx')
-rw-r--r-- | chart2/source/view/main/PlottingPositionHelper.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx index eab2f69e7d9a..dfbf38bbd90e 100644 --- a/chart2/source/view/main/PlottingPositionHelper.cxx +++ b/chart2/source/view/main/PlottingPositionHelper.cxx @@ -418,11 +418,7 @@ double PolarPlottingPositionHelper::getWidthAngleDegree( double& fStartLogicValu { const ExplicitScaleData& rAngleScale = m_bSwapXAndY ? m_aScales[1] : m_aScales[0]; if( rAngleScale.Orientation != AxisOrientation_MATHEMATICAL ) - { - double fHelp = fEndLogicValueOnAngleAxis; - fEndLogicValueOnAngleAxis = fStartLogicValueOnAngleAxis; - fStartLogicValueOnAngleAxis = fHelp; - } + std::swap( fStartLogicValueOnAngleAxis, fEndLogicValueOnAngleAxis ); double fStartAngleDegree = transformToAngleDegree( fStartLogicValueOnAngleAxis ); double fEndAngleDegree = transformToAngleDegree( fEndLogicValueOnAngleAxis ); |