From 900b137fbe73d2710d19605212b9c53afcdda11f Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 16 Dec 2018 11:55:22 -0800 Subject: Fixed few minor issues revealed by code analysis --- Tests/TestApp/src/TestTexturing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Tests/TestApp/src/TestTexturing.cpp') diff --git a/Tests/TestApp/src/TestTexturing.cpp b/Tests/TestApp/src/TestTexturing.cpp index 75c6914..8628625 100644 --- a/Tests/TestApp/src/TestTexturing.cpp +++ b/Tests/TestApp/src/TestTexturing.cpp @@ -57,7 +57,7 @@ void TestTexturing::GenerateTextureData(IRenderDevice *pRenderDevice, std::vecto Uint32 MipHeight = TexDesc.Height >> Level; auto Stride = (MipWidth + 64) * PixelSize; - Data.resize(Data.size() + Stride * MipHeight); + Data.resize(Data.size() + size_t{Stride} * size_t{MipHeight}); auto *pCurrLevelPtr = &Data[CurrLevelOffset]; LevelDataOffsets[Level] = CurrLevelOffset; SubResouces[Level].Stride = Stride; @@ -75,7 +75,7 @@ void TestTexturing::GenerateTextureData(IRenderDevice *pRenderDevice, std::vecto { float fCurrCmpCol = Color[iCmp]; fCurrCmpCol = fCurrCmpCol - floor(fCurrCmpCol); - void *pDstCmp = pCurrLevelPtr + (i*PixelSize + iCmp * PixelFormatAttribs.ComponentSize + j*Stride); + void *pDstCmp = pCurrLevelPtr + (i*size_t{PixelSize} + iCmp * size_t{PixelFormatAttribs.ComponentSize} + j*size_t{Stride}); switch(PixelFormatAttribs.ComponentType) { case COMPONENT_TYPE_FLOAT: -- cgit v1.2.3