From 3f284b6f12e3eb047398998b223663b38a9bfec8 Mon Sep 17 00:00:00 2001 From: Liu Hao Date: Mon, 15 Aug 2022 00:11:55 +0800 Subject: 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 Tested-by: Jenkins --- svx/source/dialog/rubydialog.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'svx/source/dialog/rubydialog.cxx') diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 135090c87211..3abd7e9b3517 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -741,11 +741,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang sal_Int16 nRubyPos = m_pParentDlg->m_xPositionLB->get_active(); if (nRubyPos == 1) // BOTTOM - { - tools::Long nTmp = nYRuby; - nYRuby = nYBase; - nYBase = nTmp; - } + std::swap(nYRuby, nYBase); else if (nRubyPos == 2) // RIGHT ( vertically ) { // Align the ruby text and base text to the vertical center. -- cgit