diff options
Diffstat (limited to 'externals/microprofile/microprofile.h')
| -rw-r--r-- | externals/microprofile/microprofile.h | 14 |
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) | |||
| 902 | #include <windows.h> | 902 | #include <windows.h> |
| 903 | #define snprintf _snprintf | 903 | #define snprintf _snprintf |
| 904 | 904 | ||
| 905 | #ifdef _MSC_VER | ||
| 905 | #pragma warning(push) | 906 | #pragma warning(push) |
| 906 | #pragma warning(disable: 4244) | 907 | #pragma warning(disable: 4244) |
| 908 | #endif | ||
| 907 | int64_t MicroProfileTicksPerSecondCpu() | 909 | int64_t MicroProfileTicksPerSecondCpu() |
| 908 | { | 910 | { |
| 909 | static int64_t nTicksPerSecond = 0; | 911 | static int64_t nTicksPerSecond = 0; |
| @@ -946,7 +948,7 @@ typedef HANDLE MicroProfileThread; | |||
| 946 | DWORD _stdcall ThreadTrampoline(void* pFunc) | 948 | DWORD _stdcall ThreadTrampoline(void* pFunc) |
| 947 | { | 949 | { |
| 948 | MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc; | 950 | MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc; |
| 949 | return (uint32_t)F(0); | 951 | return (DWORD)F(0); |
| 950 | } | 952 | } |
| 951 | 953 | ||
| 952 | inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) | 954 | inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) |
| @@ -1742,10 +1744,10 @@ void MicroProfileFlip() | |||
| 1742 | } | 1744 | } |
| 1743 | } | 1745 | } |
| 1744 | } | 1746 | } |
| 1745 | for(uint32_t i = 0; i < MICROPROFILE_MAX_GROUPS; ++i) | 1747 | for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j) |
| 1746 | { | 1748 | { |
| 1747 | pLog->nGroupTicks[i] += nGroupTicks[i]; | 1749 | pLog->nGroupTicks[j] += nGroupTicks[j]; |
| 1748 | pFrameGroup[i] += nGroupTicks[i]; | 1750 | pFrameGroup[j] += nGroupTicks[j]; |
| 1749 | } | 1751 | } |
| 1750 | pLog->nStackPos = nStackPos; | 1752 | pLog->nStackPos = nStackPos; |
| 1751 | } | 1753 | } |
| @@ -3328,7 +3330,7 @@ bool MicroProfileIsLocalThread(uint32_t nThreadId) | |||
| 3328 | #endif | 3330 | #endif |
| 3329 | #else | 3331 | #else |
| 3330 | 3332 | ||
| 3331 | bool MicroProfileIsLocalThread(uint32_t nThreadId){return false;} | 3333 | bool MicroProfileIsLocalThread([[maybe_unused]] uint32_t nThreadId) { return false; } |
| 3332 | void MicroProfileStopContextSwitchTrace(){} | 3334 | void MicroProfileStopContextSwitchTrace(){} |
| 3333 | void MicroProfileStartContextSwitchTrace(){} | 3335 | void MicroProfileStartContextSwitchTrace(){} |
| 3334 | 3336 | ||
| @@ -3576,7 +3578,7 @@ int MicroProfileGetGpuTickReference(int64_t* pOutCpu, int64_t* pOutGpu) | |||
| 3576 | 3578 | ||
| 3577 | #undef S | 3579 | #undef S |
| 3578 | 3580 | ||
| 3579 | #ifdef _WIN32 | 3581 | #ifdef _MSC_VER |
| 3580 | #pragma warning(pop) | 3582 | #pragma warning(pop) |
| 3581 | #endif | 3583 | #endif |
| 3582 | 3584 | ||