Skip to content

Commit

Permalink
Fix incorrect use of #pragma warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Mar 30, 2017
1 parent 269ddee commit 83a8881
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/xrCore/_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ XRCORE_API extern u64 QPC();

#ifdef M_VISUAL
#ifndef _M_AMD64
#pragma warning(push)
#pragma warning(disable : 4035)
IC u64 GetCLK(void)
{
_asm _emit 0x0F;
_asm _emit 0x31;
}
#pragma warning(default : 4035)
#pragma warning(pop)
#else
IC u64 GetCLK(void) { return __rdtsc(); }
#endif
Expand Down
3 changes: 2 additions & 1 deletion src/xrCore/xrsharedmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#pragma pack(push, 4)
//////////////////////////////////////////////////////////////////////////
#pragma warning(push)
#pragma warning(disable : 4200)
struct XRCORE_API smem_value
{
Expand Down Expand Up @@ -46,7 +47,7 @@ IC bool smem_equal(const smem_value* A, u32 dwCRC, u32 dwLength, u8* ptr)
return false;
return 0 == memcmp(A->value, ptr, dwLength);
};
#pragma warning(default : 4200)
#pragma warning(pop)

//////////////////////////////////////////////////////////////////////////
class XRCORE_API smem_container
Expand Down
3 changes: 2 additions & 1 deletion src/xrCore/xrstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
typedef const char* str_c;

//////////////////////////////////////////////////////////////////////////
#pragma warning(push)
#pragma warning(disable : 4200)
struct XRCORE_API str_value
{
Expand All @@ -30,7 +31,7 @@ struct XRCORE_API str_hash_function
IC u32 operator()(str_value const* const value) const { return value->dwCRC; };
};

#pragma warning(default : 4200)
#pragma warning(pop)

struct str_container_impl;
class IWriter;
Expand Down

0 comments on commit 83a8881

Please sign in to comment.