Skip to content

Commit 33625f7

Browse files
[lldb] Use std::optional::value_or (NFC) (#151629)
1 parent b6cfa02 commit 33625f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Interpreter/OptionArgParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ lldb::addr_t OptionArgParser::ToRawAddress(const ExecutionContext *exe_ctx,
161161
lldb::addr_t fail_value,
162162
Status *error_ptr) {
163163
std::optional<lldb::addr_t> maybe_addr = DoToAddress(exe_ctx, s, error_ptr);
164-
return maybe_addr ? *maybe_addr : fail_value;
164+
return maybe_addr.value_or(fail_value);
165165
}
166166

167167
lldb::addr_t OptionArgParser::ToAddress(const ExecutionContext *exe_ctx,

0 commit comments

Comments
 (0)