include/comphelper/parallelsort.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit ac520c337bd3799366a1fd1dbda0baabb299e3bc Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Mar 29 13:28:21 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Mar 29 14:19:38 2022 +0200 Revert "removed pointless using namespace std" This reverts commit 5b53dd0514c25f907c80d523b078387db71f859b. The using directive was not pointless, it was necessary to correctly call the std::swap customization point. Change-Id: I642587fe2a8fc281a6079837edce3a8a6c47ea33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132184 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/include/comphelper/parallelsort.hxx b/include/comphelper/parallelsort.hxx index 57eccc4770e3..94d86e0d119b 100644 --- a/include/comphelper/parallelsort.hxx +++ b/include/comphelper/parallelsort.hxx @@ -147,7 +147,8 @@ template <class RandItr> struct Sampler for (size_t nIdx = 0; nIdx < nSamples; ++nIdx) { size_t nSel = aGenerator() % nLen--; - std::swap(*(aBegin + nSel), *(aBegin + nLen)); + using namespace std; + swap(*(aBegin + nSel), *(aBegin + nLen)); pSamples[nIdx] = *(aBegin + nLen); } }