From 63ebed57600ac0236cd76d707e3b4d69215ede19 Mon Sep 17 00:00:00 2001 From: Merry Date: Sat, 31 Dec 2022 17:59:12 +0000 Subject: [PATCH] x64_cpu_info: Add required C headers --- tests/x64_cpu_info.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/x64_cpu_info.cpp b/tests/x64_cpu_info.cpp index b17aa037..8e67f0fc 100644 --- a/tests/x64_cpu_info.cpp +++ b/tests/x64_cpu_info.cpp @@ -4,6 +4,10 @@ */ #include +#include +#include +#include +#include #include #include @@ -13,8 +17,8 @@ TEST_CASE("Host CPU supports", "[a64]") { using Cpu = Xbyak::util::Cpu; Cpu cpu_info; - std::array cpu_name; - for (uint32_t i = 2; i < 5; ++i) { + std::array cpu_name; + for (std::uint32_t i = 2; i < 5; ++i) { cpu_info.getCpuid(0x80000000 | i, cpu_name.data()); std::printf("%.16s", reinterpret_cast(cpu_name.data())); } @@ -96,11 +100,11 @@ TEST_CASE("Host CPU supports", "[a64]") { #undef X }; - constexpr size_t line_max = 80; - size_t line_length = 0; + constexpr std::size_t line_max = 80; + std::size_t line_length = 0; for (const auto& [type, name] : types) { if (cpu_info.has(type)) { - const size_t name_length = std::strlen(name) + 1; + const std::size_t name_length = std::strlen(name) + 1; if ((line_length + name_length) >= line_max) { line_length = name_length; std::putchar('\n');