From 92b10025ec96178e1c64fbb62d3ad095a39ae114 Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 15 Jul 2015 08:35:50 +0100 Subject: [PATCH] Fix Klocwork issues. Change-Id: I50d42a595bfc882fde7edf57e0a3d867f46769a6 Signed-off-by: Victor Cebollada --- .../internal/atlas-manager/atlas-manager.h | 34 +++++++++++++--------- .../internal/text/decorator/text-decorator.cpp | 1 + .../text/rendering/atlas/atlas-glyph-manager.h | 6 ++-- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/dali-toolkit/internal/atlas-manager/atlas-manager.h b/dali-toolkit/internal/atlas-manager/atlas-manager.h index 79eb9b7..532be6f 100644 --- a/dali-toolkit/internal/atlas-manager/atlas-manager.h +++ b/dali-toolkit/internal/atlas-manager/atlas-manager.h @@ -162,10 +162,10 @@ public: struct AtlasSize { - SizeType mWidth; // width of the atlas in pixels - SizeType mHeight; // height of the atlas in pixels - SizeType mBlockWidth; // width of a block in pixels - SizeType mBlockHeight; // height of a block in pixels + SizeType mWidth; ///< width of the atlas in pixels + SizeType mHeight; ///< height of the atlas in pixels + SizeType mBlockWidth; ///< width of a block in pixels + SizeType mBlockHeight; ///< height of a block in pixels }; /** @@ -174,17 +174,25 @@ public: */ struct AtlasMetricsEntry { - AtlasSize mSize; // size of atlas and blocks - SizeType mBlocksUsed; // number of blocks used in the atlas - SizeType mTotalBlocks; // total blocks used by atlas - Pixel::Format mPixelFormat; // pixel format of the atlas + AtlasSize mSize; ///< size of atlas and blocks + SizeType mBlocksUsed; ///< number of blocks used in the atlas + SizeType mTotalBlocks; ///< total blocks used by atlas + Pixel::Format mPixelFormat; ///< pixel format of the atlas }; struct Metrics { - SizeType mAtlasCount; // number of atlases - SizeType mTextureMemoryUsed; // texture memory used by atlases - Dali::Vector< AtlasMetricsEntry > mAtlasMetrics; // container of atlas information + Metrics() + : mAtlasCount( 0u ), + mTextureMemoryUsed( 0u ) + {} + + ~Metrics() + {} + + SizeType mAtlasCount; ///< number of atlases + SizeType mTextureMemoryUsed; ///< texture memory used by atlases + Dali::Vector< AtlasMetricsEntry > mAtlasMetrics; ///< container of atlas information }; struct Vertex2D @@ -233,8 +241,8 @@ public: */ struct AtlasSlot { - ImageId mImageId; // Id of stored Image - AtlasId mAtlasId; // Id of Atlas containing this slot + ImageId mImageId; ///< Id of stored Image + AtlasId mAtlasId; ///< Id of Atlas containing this slot }; typedef Dali::Vector< AtlasManager::AtlasSlot > slotContainer; diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index d75df7b..49fe080 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -273,6 +273,7 @@ struct Decorator::Impl : public ConnectionTracker mScrollThreshold( SCROLL_THRESHOLD ), mScrollSpeed( SCROLL_SPEED ), mScrollDistance( SCROLL_DISTANCE ), + mTextDepth( 0u ), mActiveCopyPastePopup( false ), mCursorBlinkStatus( true ), mPrimaryCursorVisible( false ), diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h index 26dea0b..a74ce28 100644 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h @@ -50,9 +50,9 @@ public: ~Metrics() {} - uint32_t mGlyphCount; // number of glyphs being managed - std::string mVerboseGlyphCounts; // a verbose list of the glyphs + ref counts - AtlasManager::Metrics mAtlasMetrics; // metrics from the Atlas Manager + uint32_t mGlyphCount; ///< number of glyphs being managed + std::string mVerboseGlyphCounts; ///< a verbose list of the glyphs + ref counts + AtlasManager::Metrics mAtlasMetrics; ///< metrics from the Atlas Manager }; /** -- 2.7.4