diff options
author | Mikhail Gorbushin <m.gorbushin@corp.mail.ru> | 2018-08-31 11:35:44 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-08-31 15:34:54 +0300 |
commit | 7b1b6d68940678abe4b182e7eaab425f8e8f5bfa (patch) | |
tree | 1a60cef3101193a11f346727ead8f8dd1a58199d /qt | |
parent | e73f3c434b1040685c365383baebab93411205bb (diff) |
remove my::make_unique
Diffstat (limited to 'qt')
-rw-r--r-- | qt/qt_common/qtoglcontext.cpp | 11 | ||||
-rw-r--r-- | qt/qt_common/qtoglcontextfactory.cpp | 9 | ||||
-rw-r--r-- | qt/qt_common/scale_slider.cpp | 4 |
3 files changed, 13 insertions, 11 deletions
diff --git a/qt/qt_common/qtoglcontext.cpp b/qt/qt_common/qtoglcontext.cpp index c47f8acd78..69bb449787 100644 --- a/qt/qt_common/qtoglcontext.cpp +++ b/qt/qt_common/qtoglcontext.cpp @@ -4,10 +4,11 @@ #include "base/logging.hpp" #include "base/macros.hpp" #include "base/math.hpp" -#include "base/stl_add.hpp" #include "drape/glfunctions.hpp" +#include <memory> + namespace qt { namespace common @@ -15,7 +16,7 @@ namespace common // QtRenderOGLContext ------------------------------------------------------------------------------ QtRenderOGLContext::QtRenderOGLContext(QOpenGLContext * rootContext, QOffscreenSurface * surface) : m_surface(surface) - , m_ctx(my::make_unique<QOpenGLContext>()) + , m_ctx(std::make_unique<QOpenGLContext>()) { m_ctx->setFormat(rootContext->format()); m_ctx->setShareContext(rootContext); @@ -62,8 +63,8 @@ void QtRenderOGLContext::Resize(int w, int h) m_texRect = QRectF(0.0, 0.0, w / static_cast<float>(size.width()), h / static_cast<float>(size.height())); - m_frontFrame = my::make_unique<QOpenGLFramebufferObject>(size, QOpenGLFramebufferObject::Depth); - m_backFrame = my::make_unique<QOpenGLFramebufferObject>(size, QOpenGLFramebufferObject::Depth); + m_frontFrame = std::make_unique<QOpenGLFramebufferObject>(size, QOpenGLFramebufferObject::Depth); + m_backFrame = std::make_unique<QOpenGLFramebufferObject>(size, QOpenGLFramebufferObject::Depth); } void QtRenderOGLContext::LockFrame() @@ -91,7 +92,7 @@ void QtRenderOGLContext::UnlockFrame() // QtUploadOGLContext ------------------------------------------------------------------------------ QtUploadOGLContext::QtUploadOGLContext(QOpenGLContext * rootContext, QOffscreenSurface * surface) - : m_surface(surface), m_ctx(my::make_unique<QOpenGLContext>()) + : m_surface(surface), m_ctx(std::make_unique<QOpenGLContext>()) { m_ctx->setFormat(rootContext->format()); m_ctx->setShareContext(rootContext); diff --git a/qt/qt_common/qtoglcontextfactory.cpp b/qt/qt_common/qtoglcontextfactory.cpp index c47bff31ff..237b57657d 100644 --- a/qt/qt_common/qtoglcontextfactory.cpp +++ b/qt/qt_common/qtoglcontextfactory.cpp @@ -1,7 +1,8 @@ #include "qt/qt_common/qtoglcontextfactory.hpp" #include "base/assert.hpp" -#include "base/stl_add.hpp" + +#include <memory> namespace qt { @@ -57,7 +58,7 @@ void QtOGLContextFactory::UnlockFrame() dp::GraphicsContext * QtOGLContextFactory::GetDrawContext() { if (!m_drawContext) - m_drawContext = my::make_unique<QtRenderOGLContext>(m_rootContext, m_drawSurface.get()); + m_drawContext = std::make_unique<QtRenderOGLContext>(m_rootContext, m_drawSurface.get()); return m_drawContext.get(); } @@ -65,7 +66,7 @@ dp::GraphicsContext * QtOGLContextFactory::GetDrawContext() dp::GraphicsContext * QtOGLContextFactory::GetResourcesUploadContext() { if (!m_uploadContext) - m_uploadContext = my::make_unique<QtUploadOGLContext>(m_rootContext, m_uploadSurface.get()); + m_uploadContext = std::make_unique<QtUploadOGLContext>(m_rootContext, m_uploadSurface.get()); return m_uploadContext.get(); } @@ -73,7 +74,7 @@ dp::GraphicsContext * QtOGLContextFactory::GetResourcesUploadContext() std::unique_ptr<QOffscreenSurface> QtOGLContextFactory::CreateSurface() { QSurfaceFormat format = m_rootContext->format(); - auto result = my::make_unique<QOffscreenSurface>(m_rootContext->screen()); + auto result = std::make_unique<QOffscreenSurface>(m_rootContext->screen()); result->setFormat(format); result->create(); ASSERT(result->isValid(), ()); diff --git a/qt/qt_common/scale_slider.cpp b/qt/qt_common/scale_slider.cpp index 3f391d821a..50c69f9e5b 100644 --- a/qt/qt_common/scale_slider.cpp +++ b/qt/qt_common/scale_slider.cpp @@ -9,7 +9,7 @@ #include <QtWidgets/QToolBar> -#include "base/stl_add.hpp" +#include <memory> namespace qt { @@ -45,7 +45,7 @@ void ScaleSlider::Embed(Qt::Orientation orient, QToolBar & toolBar, MapWidget & { toolBar.addAction(QIcon(":/common/plus.png"), tr("Scale +"), &mapWidget, SLOT(ScalePlus())); { - auto slider = my::make_unique<ScaleSlider>(orient, &toolBar); + auto slider = std::make_unique<ScaleSlider>(orient, &toolBar); mapWidget.BindSlider(*slider); toolBar.addWidget(slider.release()); } |