proper C++ casting

This commit is contained in:
Gael Guennebaud
2012-01-31 18:56:25 +01:00
parent 10cd52350f
commit 634fedaf68
3 changed files with 5 additions and 5 deletions

View File

@@ -763,7 +763,7 @@ namespace internal {
inline bool cpuid_is_vendor(int abcd[4], const char* vendor)
{
return abcd[1]==((int*)(vendor))[0] && abcd[3]==((int*)(vendor))[1] && abcd[2]==((int*)(vendor))[2];
return abcd[1]==(reinterpret_cast<const int*>(vendor))[0] && abcd[3]==(reinterpret_cast<const int*>(vendor))[1] && abcd[2]==(reinterpret_cast<const int*>(vendor))[2];
}
inline void queryCacheSizes_intel_direct(int& l1, int& l2, int& l3)