diff options
| author | 2018-01-15 00:08:03 +0100 | |
|---|---|---|
| committer | 2018-01-15 00:08:03 +0100 | |
| commit | b20dfb357b0ad9964fe9507c6e17a68d8ef66ebc (patch) | |
| tree | 7f241abbd399ffdb149654cfe974bc0456bc2ae7 /externals/microprofile | |
| parent | Merge pull request #7 from JayFoxRox/remove-surface-viewer (diff) | |
| download | yuzu-b20dfb357b0ad9964fe9507c6e17a68d8ef66ebc.tar.gz yuzu-b20dfb357b0ad9964fe9507c6e17a68d8ef66ebc.tar.xz yuzu-b20dfb357b0ad9964fe9507c6e17a68d8ef66ebc.zip | |
Fix some warnings in the microprofile
Diffstat (limited to 'externals/microprofile')
| -rw-r--r-- | externals/microprofile/microprofileui.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/externals/microprofile/microprofileui.h b/externals/microprofile/microprofileui.h index 09223b33f..7670fec5d 100644 --- a/externals/microprofile/microprofileui.h +++ b/externals/microprofile/microprofileui.h | |||
| @@ -1853,7 +1853,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight) | |||
| 1853 | { | 1853 | { |
| 1854 | if(nMetaIndex < MICROPROFILE_META_MAX && S.MetaCounters[nMetaIndex].pName) | 1854 | if(nMetaIndex < MICROPROFILE_META_MAX && S.MetaCounters[nMetaIndex].pName) |
| 1855 | { | 1855 | { |
| 1856 | uint32_t nStrWidth = strlen(S.MetaCounters[nMetaIndex].pName); | 1856 | uint32_t nStrWidth = static_cast<uint32_t>(strlen(S.MetaCounters[nMetaIndex].pName)); |
| 1857 | if(S.nBars & MP_DRAW_TIMERS) | 1857 | if(S.nBars & MP_DRAW_TIMERS) |
| 1858 | nWidth += 6 + (1+MICROPROFILE_TEXT_WIDTH) * (nStrWidth); | 1858 | nWidth += 6 + (1+MICROPROFILE_TEXT_WIDTH) * (nStrWidth); |
| 1859 | if(S.nBars & MP_DRAW_AVERAGE) | 1859 | if(S.nBars & MP_DRAW_AVERAGE) |
| @@ -1907,7 +1907,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight) | |||
| 1907 | { | 1907 | { |
| 1908 | if(0 != (S.nBars & (MP_DRAW_META_FIRST<<i)) && S.MetaCounters[i].pName) | 1908 | if(0 != (S.nBars & (MP_DRAW_META_FIRST<<i)) && S.MetaCounters[i].pName) |
| 1909 | { | 1909 | { |
| 1910 | uint32_t nBufferSize = strlen(S.MetaCounters[i].pName) + 32; | 1910 | uint32_t nBufferSize = static_cast<uint32_t>(strlen(S.MetaCounters[i].pName) + 32); |
| 1911 | char* buffer = (char*)alloca(nBufferSize); | 1911 | char* buffer = (char*)alloca(nBufferSize); |
| 1912 | if(S.nBars & MP_DRAW_TIMERS) | 1912 | if(S.nBars & MP_DRAW_TIMERS) |
| 1913 | nX += MicroProfileDrawBarMetaCount(nX, nY, &S.MetaCounters[i].nCounters[0], S.MetaCounters[i].pName, nTotalHeight) + 1; | 1913 | nX += MicroProfileDrawBarMetaCount(nX, nY, &S.MetaCounters[i].nCounters[0], S.MetaCounters[i].pName, nTotalHeight) + 1; |
| @@ -2599,7 +2599,7 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight) | |||
| 2599 | nOffsetY = nOffsetYBase; | 2599 | nOffsetY = nOffsetYBase; |
| 2600 | float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg; | 2600 | float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg; |
| 2601 | const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg"; | 2601 | const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg"; |
| 2602 | MicroProfileDrawText(nMaxOffsetX, nOffsetY, (uint32_t)-1, pString, strlen(pString)); | 2602 | MicroProfileDrawText(nMaxOffsetX, nOffsetY, (uint32_t)-1, pString, static_cast<uint32_t>(strlen(pString))); |
| 2603 | int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference); | 2603 | int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference); |
| 2604 | MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize); | 2604 | MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize); |
| 2605 | for(uint32_t i = 0; i < nCount; ++i) | 2605 | for(uint32_t i = 0; i < nCount; ++i) |
| @@ -2613,7 +2613,7 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight) | |||
| 2613 | { | 2613 | { |
| 2614 | nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT); | 2614 | nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT); |
| 2615 | const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg"; | 2615 | const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg"; |
| 2616 | MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, (uint32_t)-1, pString, strlen(pString)); | 2616 | MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, (uint32_t)-1, pString, static_cast<uint32_t>(strlen(pString))); |
| 2617 | int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference); | 2617 | int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference); |
| 2618 | MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize); | 2618 | MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize); |
| 2619 | nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); | 2619 | nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); |