Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorMikhail Gorbushin <m.gorbushin@corp.mail.ru>2018-08-31 11:35:44 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2018-08-31 15:34:54 +0300
commit7b1b6d68940678abe4b182e7eaab425f8e8f5bfa (patch)
tree1a60cef3101193a11f346727ead8f8dd1a58199d /qt
parente73f3c434b1040685c365383baebab93411205bb (diff)
remove my::make_unique
Diffstat (limited to 'qt')
-rw-r--r--qt/qt_common/qtoglcontext.cpp11
-rw-r--r--qt/qt_common/qtoglcontextfactory.cpp9
-rw-r--r--qt/qt_common/scale_slider.cpp4
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());
}