Skip to content

Commit 83a8881

Browse files
committed
Fix incorrect use of #pragma warning
1 parent 269ddee commit 83a8881

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/xrCore/_math.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ XRCORE_API extern u64 QPC();
3131

3232
#ifdef M_VISUAL
3333
#ifndef _M_AMD64
34+
#pragma warning(push)
3435
#pragma warning(disable : 4035)
3536
IC u64 GetCLK(void)
3637
{
3738
_asm _emit 0x0F;
3839
_asm _emit 0x31;
3940
}
40-
#pragma warning(default : 4035)
41+
#pragma warning(pop)
4142
#else
4243
IC u64 GetCLK(void) { return __rdtsc(); }
4344
#endif

src/xrCore/xrsharedmem.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#pragma pack(push, 4)
66
//////////////////////////////////////////////////////////////////////////
7+
#pragma warning(push)
78
#pragma warning(disable : 4200)
89
struct XRCORE_API smem_value
910
{
@@ -46,7 +47,7 @@ IC bool smem_equal(const smem_value* A, u32 dwCRC, u32 dwLength, u8* ptr)
4647
return false;
4748
return 0 == memcmp(A->value, ptr, dwLength);
4849
};
49-
#pragma warning(default : 4200)
50+
#pragma warning(pop)
5051

5152
//////////////////////////////////////////////////////////////////////////
5253
class XRCORE_API smem_container

src/xrCore/xrstring.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
typedef const char* str_c;
1010

1111
//////////////////////////////////////////////////////////////////////////
12+
#pragma warning(push)
1213
#pragma warning(disable : 4200)
1314
struct XRCORE_API str_value
1415
{
@@ -30,7 +31,7 @@ struct XRCORE_API str_hash_function
3031
IC u32 operator()(str_value const* const value) const { return value->dwCRC; };
3132
};
3233

33-
#pragma warning(default : 4200)
34+
#pragma warning(pop)
3435

3536
struct str_container_impl;
3637
class IWriter;

0 commit comments

Comments
 (0)