diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2013-05-29 17:05:25 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:55:30 +0300 |
commit | 8aca19fddb8891a137a1e25240f2692aacc6942c (patch) | |
tree | 819cbea6eb9ac319d26a3ce77bb447e76608ce8f /qt | |
parent | f5201375f926cbad7d01b67140696655098e453f (diff) |
compile warning fix
Diffstat (limited to 'qt')
-rw-r--r-- | qt/draw_widget.cpp | 11 | ||||
-rw-r--r-- | qt/draw_widget.hpp | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 619b0c4512..05064af001 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -73,15 +73,10 @@ namespace qt { //m_timer = new QTimer(this); //connect(m_timer, SIGNAL(timeout()), this, SLOT(ScaleTimerElapsed())); - for (size_t i = 0; i < ARRAY_SIZE(m_images); ++i) - m_images[i] = 0; } DrawWidget::~DrawWidget() { - for (size_t i = 0; i < ARRAY_SIZE(m_images); ++i) - delete m_images[i]; - m_framework.reset(); } @@ -273,8 +268,8 @@ namespace qt } graphics::EDensity const density = m_framework->GetRenderPolicy()->Density(); - m_images[IMAGE_PLUS] = new ImageT("plus.png", density); - m_images[IMAGE_ARROW] = new ImageT("right-arrow.png", density); + m_images[IMAGE_PLUS] = ImageT("plus.png", density); + m_images[IMAGE_ARROW] = ImageT("right-arrow.png", density); m_isInitialized = true; } } @@ -383,7 +378,7 @@ namespace qt m_framework->DisablePlacemark(); - balloon->setImage(*m_images[index]); + balloon->setImage(m_images[index]); balloon->setGlbPivot(pivot); balloon->setBookmarkName(name); balloon->setIsVisible(true); diff --git a/qt/draw_widget.hpp b/qt/draw_widget.hpp index 7e88e0a247..f9c6d669c7 100644 --- a/qt/draw_widget.hpp +++ b/qt/draw_widget.hpp @@ -110,7 +110,7 @@ namespace qt void OnPressTaskEvent(double x, double y, unsigned ms); typedef graphics::Image::Info ImageT; - ImageT * m_images[2]; + ImageT m_images[2]; enum PopupImageIndexT { IMAGE_PLUS = 0, IMAGE_ARROW = 1 }; void ActivatePopup(m2::PointD const & pivot, string const & name, PopupImageIndexT index); void ActivatePopupWithAdressInfo(m2::PointD const & pivot, Framework::AddressInfo const & addrInfo); |