diff --git a/graphics/overlay_element.cpp b/graphics/overlay_element.cpp index 2594f2d62c..d10552e66b 100644 --- a/graphics/overlay_element.cpp +++ b/graphics/overlay_element.cpp @@ -24,8 +24,8 @@ namespace graphics m_isDirtyRect(true), m_isDirtyLayout(true), m_isDirtyRoughRect(true), - m_userInfo(p.m_userInfo), - m_inverseMatrix(math::Identity()) + m_inverseMatrix(math::Identity()), + m_userInfo(p.m_userInfo) {} m2::PointD const OverlayElement::computeTopLeft(m2::PointD const & sz, diff --git a/graphics/vertex_decl.cpp b/graphics/vertex_decl.cpp index 5179aa6072..ccbf83e2c9 100644 --- a/graphics/vertex_decl.cpp +++ b/graphics/vertex_decl.cpp @@ -1,5 +1,6 @@ #include "vertex_decl.hpp" #include "defines.hpp" +#include "../base/assert.hpp" #include "../base/logging.hpp" namespace graphics @@ -76,6 +77,8 @@ namespace graphics case EFloat: FillPosition::fill(va, &vs->m_fNormal, v, stride); break; + default: + ASSERT(false, ("Not supported")); } } }; @@ -108,6 +111,8 @@ namespace graphics case EFloat: FillTexCoord::fill(va, &vs->m_fTex, v, stride); break; + default: + ASSERT(false, ("Not supported")); }; } }; diff --git a/map/ruler.cpp b/map/ruler.cpp index b2b91342e6..8a7c3e459a 100644 --- a/map/ruler.cpp +++ b/map/ruler.cpp @@ -141,9 +141,9 @@ Ruler::Params::Params() Ruler::Ruler(Params const & p) : base_t(p), + m_cacheLength(500), m_boundRects(1), m_currSystem(0), - m_cacheLength(500), m_framework(p.m_framework) { gui::CachedTextView::Params pp; diff --git a/map/screen_coverage.cpp b/map/screen_coverage.cpp index 906c0eb21b..8929f6c31b 100644 --- a/map/screen_coverage.cpp +++ b/map/screen_coverage.cpp @@ -18,12 +18,14 @@ #include "coverage_generator.hpp" ScreenCoverage::ScreenCoverage() - : m_tiler(), + : m_sequenceID(numeric_limits::max()), + m_tileRenderer(NULL), + m_coverageGenerator(NULL), m_overlay(new graphics::Overlay()), + m_isBenchmarking(false), m_isEmptyDrawingCoverage(false), m_isEmptyModelAtCoverageCenter(true), - m_leafTilesToRender(0), - m_isBenchmarking(false) + m_leafTilesToRender(0) { m_overlay->setCouldOverlap(false); } @@ -31,14 +33,15 @@ ScreenCoverage::ScreenCoverage() ScreenCoverage::ScreenCoverage(TileRenderer * tileRenderer, CoverageGenerator * coverageGenerator, shared_ptr const & cacheScreen) - : m_tileRenderer(tileRenderer), + : m_sequenceID(numeric_limits::max()), + m_tileRenderer(tileRenderer), m_coverageGenerator(coverageGenerator), m_overlay(new graphics::Overlay()), + m_isBenchmarking(false), m_isEmptyDrawingCoverage(false), m_isEmptyModelAtCoverageCenter(true), m_leafTilesToRender(0), - m_cacheScreen(cacheScreen), - m_isBenchmarking(false) + m_cacheScreen(cacheScreen) { m_overlay->setCouldOverlap(false); } 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);