From 80adb289d02addc3ea44b466484a9b6458b195ce Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 22 Sep 2020 18:39:44 +0100 Subject: [PATCH] print_info: Use std::nullopt instead of {} --- tests/print_info.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/print_info.cpp b/tests/print_info.cpp index b1cd59b2..ccb1f1d6 100644 --- a/tests/print_info.cpp +++ b/tests/print_info.cpp @@ -190,11 +190,11 @@ void ExecuteA32Instruction(u32 instruction) { const auto get_value = [&get_line]() -> std::optional { std::string line = get_line(); if (line.length() > 2 && line[0] == '0' && line[1] == 'x') line = line.substr(2); - if (line.length() > 8) return {}; + if (line.length() > 8) return std::nullopt; char* endptr; const u32 value = strtol(line.c_str(), &endptr, 16); - if (line.c_str() + line.length() != endptr) return {}; + if (line.c_str() + line.length() != endptr) return std::nullopt; return value; };