diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-04-01 17:43:40 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-04-01 17:47:50 -0400 |
| commit | fd9eab73fb73689d83c939b49bc65f838f71ea08 (patch) | |
| tree | 9985510053b86acf40bcf45227f36edfdcfa3732 /Source/Core/Common/x64CPUDetect.cpp | |
| parent | bf8ffe5bfb50ce1d2aa969ea6cc1901dc79a85ec (diff) | |
CPUDetect: Make CPUVendor enum an enum class
Avoids dumping the enum contents into the global namespace.
Diffstat (limited to 'Source/Core/Common/x64CPUDetect.cpp')
| -rw-r--r-- | Source/Core/Common/x64CPUDetect.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Common/x64CPUDetect.cpp b/Source/Core/Common/x64CPUDetect.cpp index 5e655b1850..74d22b3e32 100644 --- a/Source/Core/Common/x64CPUDetect.cpp +++ b/Source/Core/Common/x64CPUDetect.cpp @@ -84,11 +84,11 @@ void CPUInfo::Detect() __cpuid(cpu_id, 0x80000000); u32 max_ex_fn = cpu_id[0]; if (!strcmp(brand_string, "GenuineIntel")) - vendor = VENDOR_INTEL; + vendor = CPUVendor::Intel; else if (!strcmp(brand_string, "AuthenticAMD")) - vendor = VENDOR_AMD; + vendor = CPUVendor::AMD; else - vendor = VENDOR_OTHER; + vendor = CPUVendor::Other; // Set reasonable default brand string even if brand string not available. strcpy(cpu_string, brand_string); @@ -198,7 +198,7 @@ void CPUInfo::Detect() if (ht) { // New mechanism for modern Intel CPUs. - if (vendor == VENDOR_INTEL) + if (vendor == CPUVendor::Intel) { __cpuidex(cpu_id, 0x00000004, 0x00000000); int cores_x_package = ((cpu_id[0] >> 26) & 0x3F) + 1; |
