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
diff options
context:
space:
mode:
authorExMix <rahuba.youri@gmail.com>2013-04-25 20:50:42 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:53:45 +0300
commit3a70b05d1dbfeac3163ec8c8760c796fa1c534f9 (patch)
tree2274c71ca49c2d44d1932a976f137fb6dc0be4b6 /graphics
parent4094f8eacc0384b7da070d2ba84bccfbac6b9872 (diff)
In this parts of code Overlay used permanently in place.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/graphics_tests/screengl_test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/graphics_tests/screengl_test.cpp b/graphics/graphics_tests/screengl_test.cpp
index ee27ad2c53..744f92ddcc 100644
--- a/graphics/graphics_tests/screengl_test.cpp
+++ b/graphics/graphics_tests/screengl_test.cpp
@@ -19,6 +19,7 @@
#include "../../testing/testing.hpp"
#include <QtGui/QKeyEvent>
+#include "../../base/scope_guard.hpp"
#include "../../base/math.hpp"
#include "../../base/string_utils.hpp"
#include "../../std/shared_ptr.hpp"
@@ -1266,7 +1267,9 @@ namespace
public:
void DoDraw(shared_ptr<graphics::Screen> p)
{
- p->setOverlay(make_shared_ptr(new graphics::Overlay()));
+ graphics::Overlay * overlay = new graphics::Overlay();
+ MY_SCOPE_GUARD(overlayGuard, bind(&graphics::Overlay::Deleter::DeleteOverlay, overlay));
+ p->setOverlay(overlay);
p->overlay()->setCouldOverlap(false);
p->drawSymbol(m2::PointD(200, 200), "current-position", graphics::EPosUnder, graphics::maxDepth);