Skip to content

Commit 324df91

Browse files
committed
fix windows compile
1 parent 684e6f5 commit 324df91

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Source/System/RTEError.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#include <utility>
2121
#include <vector>
2222

23-
24-
#ifdef __MSVC__
23+
#ifdef _MSC_VER
2524
#include <intrin.h>
26-
#else
25+
#elif defined(__linux__)
2726
#include <cpuid.h>
2827
#endif
28+
2929
#ifdef __linux__
3030
#include <sys/utsname.h>
3131
#include <fstream>
@@ -431,7 +431,7 @@ void RTEError::DumpHardwareInfo() {
431431
unsigned int vendorRegs[4] = {0};
432432
#if defined(_MSC_VER) || defined(__linux__)
433433
#ifdef _MSC_VER
434-
__cpuid(reinterpret_cast<int*>(cpuInfo), 0);
434+
__cpuid(reinterpret_cast<int*>(vendorRegs), 0);
435435
#else
436436
__cpuid(0, vendorRegs[0], vendorRegs[1], vendorRegs[2], vendorRegs[3]);
437437
#endif
@@ -445,7 +445,7 @@ void RTEError::DumpHardwareInfo() {
445445
std::string cpuModel;
446446
unsigned int modelRegs[12];
447447
#ifdef _MSC_VER
448-
__cpuid(cpuInfo, 0x80000000);
448+
__cpuid(reinterpret_cast<int*>(modelRegs), 0x80000000);
449449
#else
450450
__cpuid(0x80000000, modelRegs[0], modelRegs[1], modelRegs[2], modelRegs[3]);
451451
#endif

0 commit comments

Comments
 (0)