diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-12 12:21:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-13 19:38:08 +0000 |
commit | 47d3e82e4f2c0c06231c952a0cc2456b712da0cc (patch) | |
tree | 0f5d4aa62edb85d7c13bb6430aadfa9635c9e3ef /vcl | |
parent | ab5f16eb37d8fa2b7924f1e19f9fe8f373714adc (diff) |
boost->std
Change-Id: I9b4f884c6313a53fea543ea6f93175205351ad14
Reviewed-on: https://gerrit.libreoffice.org/18517
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/README.lifecycle | 4 | ||||
-rw-r--r-- | vcl/headless/svpbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairo_xlib_cairo.hxx | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/vcl/README.lifecycle b/vcl/README.lifecycle index 6b5cbd6e8df4..4bf17fb96cb5 100644 --- a/vcl/README.lifecycle +++ b/vcl/README.lifecycle @@ -11,7 +11,7 @@ or: pDialog->Execute(...); delete pDialog; or: - boost::shared_ptr<Dialog> xDialog(new pDialog()); // old + std::shared_ptr<Dialog> xDialog(new pDialog()); // old xDialog->Execute(...); // depending who shared the ptr this would be freed sometime @@ -118,7 +118,7 @@ or: - delete pDialog; + pDialog.disposeAndClear(); // done manually - replaces a delete or: -- boost::shared_ptr<Dialog> xDialog(new Dialog(...)); +- std::shared_ptr<Dialog> xDialog(new Dialog(...)); + ScopedVclPtrInstance<Dialog> xDialog(...); xDialog->Execute(...); + // depending how shared_ptr was shared perhaps diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index 95441c3ed775..3231043a882f 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -321,7 +321,7 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode { sal_uInt32 nEntries = 1U << nBitCount; - boost::shared_ptr< std::vector<basebmp::Color> > pPal( + std::shared_ptr< std::vector<basebmp::Color> > pPal( new std::vector<basebmp::Color>( nEntries, basebmp::Color(COL_WHITE))); const sal_uInt32 nColors = std::min( diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 91573eb5c3c0..181d5ab38be3 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -14,7 +14,6 @@ #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> -#include <boost/make_shared.hpp> #include <vcl/pngwrite.hxx> #include <vcl/bmpacc.hxx> #include <vcl/graph.hxx> @@ -1641,16 +1640,16 @@ OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const O ProgramKey aKey( rVertexShader, rFragmentShader, preamble ); - std::map< ProgramKey, boost::shared_ptr<OpenGLProgram> >::iterator + std::map< ProgramKey, std::shared_ptr<OpenGLProgram> >::iterator it = maPrograms.find( aKey ); if( it != maPrograms.end() ) return it->second.get(); - boost::shared_ptr<OpenGLProgram> pProgram = boost::make_shared<OpenGLProgram>(); + std::shared_ptr<OpenGLProgram> pProgram = std::make_shared<OpenGLProgram>(); if( !pProgram->Load( rVertexShader, rFragmentShader, preamble ) ) return NULL; - maPrograms.insert(std::pair<ProgramKey, boost::shared_ptr<OpenGLProgram> >(aKey, pProgram)); + maPrograms.insert(std::pair<ProgramKey, std::shared_ptr<OpenGLProgram> >(aKey, pProgram)); return pProgram.get(); } diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx index 5be944f87e42..7cb5b5b39b40 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx @@ -64,7 +64,7 @@ namespace cairo { void clear() { mpDisplay=NULL; mhDrawable=0; } }; - typedef boost::shared_ptr<X11Pixmap> X11PixmapSharedPtr; + typedef std::shared_ptr<X11Pixmap> X11PixmapSharedPtr; class X11Surface : public Surface { |