summaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-04-24 02:02:45 -0400
committerbunnei <bunneidev@gmail.com>2016-04-24 02:02:45 -0400
commit0964a3ff530f2eb5b7ecdf9dfbb74deea890352d (patch)
treec566efaf69f8d3564d1e678a0a31981a52794a8a /externals
parent4c9ed98084e50d093399db03bada1906d06cd765 (diff)
parent205e8f9f9ece7ee335a1987aa4a1b72f7409abd5 (diff)
Merge pull request #1576 from smspillaz/fix-build-errors-03272016
Fix various build errors encountered on Clang 3.9 on OS X
Diffstat (limited to 'externals')
-rw-r--r--externals/microprofile/microprofileui.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/externals/microprofile/microprofileui.h b/externals/microprofile/microprofileui.h
index eac1119a4..45bec8af6 100644
--- a/externals/microprofile/microprofileui.h
+++ b/externals/microprofile/microprofileui.h
@@ -879,7 +879,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
static int64_t nRefCpu = 0, nRefGpu = 0;
if(MicroProfileGetGpuTickReference(&nTickReferenceCpu, &nTickReferenceGpu))
{
- if(0 == nRefCpu || abs(nRefCpu-nBaseTicksCpu) > abs(nTickReferenceCpu-nBaseTicksCpu))
+ if(0 == nRefCpu || std::abs(nRefCpu-nBaseTicksCpu) > std::abs(nTickReferenceCpu-nBaseTicksCpu))
{
nRefCpu = nTickReferenceCpu;
nRefGpu = nTickReferenceGpu;
@@ -1230,7 +1230,12 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
const char* cLocal = MicroProfileIsLocalThread(nThreadId) ? "*": " ";
+#if defined(WIN32)
+ // nThreadId is 32-bit on Windows
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
+#else
+ int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
+#endif
uint32_t nThreadColor = -1;
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
nThreadColor = UI.nHoverColorShared|0x906060;