diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-16 19:55:22 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-16 19:55:22 +0000 |
| commit | 900b137fbe73d2710d19605212b9c53afcdda11f (patch) | |
| tree | 5ed0c61d76d677dab49c5577fe71fc41a2966c48 /Tests/TestApp/src/TestTexturing.cpp | |
| parent | cmake is back online - removed notice (diff) | |
| download | DiligentEngine-900b137fbe73d2710d19605212b9c53afcdda11f.tar.gz DiligentEngine-900b137fbe73d2710d19605212b9c53afcdda11f.zip | |
Fixed few minor issues revealed by code analysis
Diffstat (limited to 'Tests/TestApp/src/TestTexturing.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestTexturing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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: |
