From b4229e4a17a0b98957b473ae3b51e178e8701bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 1 Mar 2018 17:30:28 -0800 Subject: [PATCH] Cleanup. --- examples/common/nanovg/fontstash.h | 2 +- src/renderer_d3d12.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/common/nanovg/fontstash.h b/examples/common/nanovg/fontstash.h index cad42e5db..798b40417 100644 --- a/examples/common/nanovg/fontstash.h +++ b/examples/common/nanovg/fontstash.h @@ -903,7 +903,7 @@ int fonsAddFont(FONScontext* stash, const char* name, const char* path) fp = 0; if (readed != dataSize) goto error; - return fonsAddFontMem(stash, name, data, dataSize, 1); + return fonsAddFontMem(stash, name, data, int(dataSize), 1); error: if (data) free(data); diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index d11e3a319..a4cf8f692 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -4626,7 +4626,6 @@ data.NumQualityLevels = 0; { const uint32_t pitch = bx::strideAlign(mip.m_width*mip.m_bpp / 8, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); const uint32_t slice = bx::strideAlign(mip.m_height*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); - const uint32_t size = slice*depth; uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, slice*depth); bimg::imageCopy(temp @@ -4644,11 +4643,6 @@ data.NumQualityLevels = 0; ++kk; } - else - { - const uint32_t pitch = bx::strideAlign(width*bpp / 8, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - const uint32_t slice = bx::strideAlign(height*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); - } width >>= 1; height >>= 1;