diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-19 21:00:16 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-22 09:32:52 +0100 |
commit | 0a0cf00b173d3207ae167b256e496d005615f1ee (patch) | |
tree | 3c3a9b12e6bdb8ef1e72a28e0a7bf517d2da7ec5 /vcl/opengl/salbmp.cxx | |
parent | 41abd684a6d1f3da71084fd854f66e22cb171b9d (diff) |
C++17 deprecated std::shared_ptr::unique()
Most of these calls are in assertions, and the ones that aren't should
be guarded by SolarMutex, so the thread safety concerns that caused
unique() to be deprecated don't look relevant, so use use_count(),
which oddly enough isn't deprecated.
Change-Id: Ia166615af6c3ce85145c391752669c7461bd35fb
Reviewed-on: https://gerrit.libreoffice.org/48222
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl/opengl/salbmp.cxx')
-rw-r--r-- | vcl/opengl/salbmp.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 93fcf0e670c2..4127c46a509b 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -756,7 +756,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode ) } // mpUserBuffer must be unique when we are doing the write access - if (nMode == BitmapAccessMode::Write && mpUserBuffer && !mpUserBuffer.unique()) + if (nMode == BitmapAccessMode::Write && mpUserBuffer && mpUserBuffer.use_count() > 1) { std::shared_ptr<sal_uInt8> aBuffer(mpUserBuffer); |