sw/source/core/doc/doccomp.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit fb41d0d2969726a00bcb5ac381ca77f4cb7230bd Author: Dr. David Alan Gilbert <d...@treblig.org> AuthorDate: Thu May 11 00:49:17 2023 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sat May 13 08:42:53 2023 +0200 tdf#148251 doccomp: Use std::swap instead of using temporary values Another swap case in LgstCommonSubseq::FindL Change-Id: Ida1e3f4f2a40bb4bc6da84e29d3fb969ff24fe6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151655 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 2941112bc5d8..32ec6bb85aaa 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -2475,9 +2475,7 @@ void LgstCommonSubseq::FindL( int *pL, int nStt1, int nEnd1, else currL[j] = std::max( currL[j - 1], prevL[j] ); } - int *tmp = currL; - currL = prevL; - prevL = tmp; + std::swap( currL, prevL ); } memcpy( pL, prevL, ( nLen2 + 1 ) * sizeof( *prevL ) ); }