summaryrefslogtreecommitdiffstats
path: root/externals/microprofile/microprofile.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-30 20:02:02 +0100
committerLioncash <mathew1800@gmail.com>2020-11-02 21:50:58 +0100
commit4a4b685a0420b0ac7c026cd2370c23d54f469976 (patch)
tree8de9e9a72563a369dac5ec8183e417e40ee4b8bf /externals/microprofile/microprofile.h
parentCMakeLists: Resolve MSVC build failures (diff)
downloadyuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar
yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.gz
yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.bz2
yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.lz
yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.xz
yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.zst
yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.zip
Diffstat (limited to '')
-rw-r--r--externals/microprofile/microprofile.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/externals/microprofile/microprofile.h b/externals/microprofile/microprofile.h
index 85d5bd5de..5c381f002 100644
--- a/externals/microprofile/microprofile.h
+++ b/externals/microprofile/microprofile.h
@@ -902,8 +902,10 @@ inline uint16_t MicroProfileGetGroupIndex(MicroProfileToken t)
#include <windows.h>
#define snprintf _snprintf
+#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4244)
+#endif
int64_t MicroProfileTicksPerSecondCpu()
{
static int64_t nTicksPerSecond = 0;
@@ -946,7 +948,7 @@ typedef HANDLE MicroProfileThread;
DWORD _stdcall ThreadTrampoline(void* pFunc)
{
MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc;
- return (uint32_t)F(0);
+ return (DWORD)F(0);
}
inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
@@ -1742,10 +1744,10 @@ void MicroProfileFlip()
}
}
}
- for(uint32_t i = 0; i < MICROPROFILE_MAX_GROUPS; ++i)
+ for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
{
- pLog->nGroupTicks[i] += nGroupTicks[i];
- pFrameGroup[i] += nGroupTicks[i];
+ pLog->nGroupTicks[j] += nGroupTicks[j];
+ pFrameGroup[j] += nGroupTicks[j];
}
pLog->nStackPos = nStackPos;
}
@@ -3328,7 +3330,7 @@ bool MicroProfileIsLocalThread(uint32_t nThreadId)
#endif
#else
-bool MicroProfileIsLocalThread(uint32_t nThreadId){return false;}
+bool MicroProfileIsLocalThread([[maybe_unused]] uint32_t nThreadId) { return false; }
void MicroProfileStopContextSwitchTrace(){}
void MicroProfileStartContextSwitchTrace(){}
@@ -3576,7 +3578,7 @@ int MicroProfileGetGpuTickReference(int64_t* pOutCpu, int64_t* pOutGpu)
#undef S
-#ifdef _WIN32
+#ifdef _MSC_VER
#pragma warning(pop)
#endif