1
0
forked from 0ad/0ad

acpi: fix cast error (caught by runtime check)

x86_x64: simplify MSC version check

This was SVN commit r9846.
This commit is contained in:
janwas 2011-07-16 17:27:07 +00:00
parent 4ca278c48f
commit dd054c8d97
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ static u8 ComputeChecksum(PCV_u8 buf, size_t numBytes)
// (can't use std::accumulate - we need 8-bit wraparound)
u8 sum = 0;
for(PCV_u8 p = buf; p < buf+numBytes; p++)
sum = u8(sum + *p);
sum = u8((sum + *p) & 0xFF);
return sum;
}

View File

@ -45,7 +45,7 @@
#endif
#define CPUID_INTRINSIC 0
#if MSC_VERSION > 1500 || (MSC_VERSION == 1500 && _MSC_FULL_VER >= 150030729) // __cpuidex available on VC10+ and VC9 SP1 (allows setting ecx beforehand)
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 150030729 // __cpuidex available on VC10+ and VC9 SP1 (allows setting ecx beforehand)
# undef CPUID_INTRINSIC
# define CPUID_INTRINSIC 1
#else