diff options
author | krishna keshav <princy.krishnakeshav@gmail.com> | 2016-05-29 21:04:41 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-30 07:12:21 +0000 |
commit | a7e2d4923b220900f41d0b70904377c771939e6f (patch) | |
tree | 669c89b90aae1d7b6b4b729e64c7510a10f52cb7 /vcl/opengl/FixedTextureAtlas.cxx | |
parent | 990082f37c31380d9fedd62c5dac1b5bff4c9636 (diff) |
tdf#94205 Use o3tl::make_unique instead of new + std::move
removed std::unique_ptr and std::move to make_unique in vcl/opengl/FixedTextureAtlas.cxx
Change-Id: I7cbff152c3daae68a18ec08607cac030a1f4af8e
Reviewed-on: https://gerrit.libreoffice.org/25613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/opengl/FixedTextureAtlas.cxx')
-rw-r--r-- | vcl/opengl/FixedTextureAtlas.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/opengl/FixedTextureAtlas.cxx b/vcl/opengl/FixedTextureAtlas.cxx index 87c5bb1ff2ac..420121d91475 100644 --- a/vcl/opengl/FixedTextureAtlas.cxx +++ b/vcl/opengl/FixedTextureAtlas.cxx @@ -17,6 +17,8 @@ #include "opengl/FixedTextureAtlas.hxx" +#include <o3tl/make_unique.hxx> + struct FixedTexture { ImplOpenGLTexture* mpTexture; @@ -83,11 +85,9 @@ void FixedTextureAtlasManager::CreateNewTexture() { int nTextureWidth = mWidthFactor * mSubTextureSize; int nTextureHeight = mHeightFactor * mSubTextureSize; - std::unique_ptr<FixedTexture> pFixedTexture( - new FixedTexture(new ImplOpenGLTexture(nTextureWidth, nTextureHeight, true), + maFixedTextures.push_back(o3tl::make_unique<FixedTexture>(new ImplOpenGLTexture(nTextureWidth, nTextureHeight, true), mWidthFactor * mHeightFactor)); - maFixedTextures.push_back(std::move(pFixedTexture)); } OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight) |