chore: replace absl::optional<T> with std::optional<T> (#40928)

* chore: replace absl::optional<T> with std::optional<T>

* IWYU
This commit is contained in:
Milan Burda 2024-01-10 23:23:35 +01:00 committed by GitHub
parent fac964ac0d
commit 892c9d78a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
129 changed files with 419 additions and 397 deletions

View file

@ -15,8 +15,7 @@ namespace electron {
namespace {
using CodeAndShiftedChar =
std::pair<ui::KeyboardCode, absl::optional<char16_t>>;
using CodeAndShiftedChar = std::pair<ui::KeyboardCode, std::optional<char16_t>>;
constexpr CodeAndShiftedChar KeyboardCodeFromKeyIdentifier(
base::StringPiece str) {
@ -274,7 +273,7 @@ constexpr CodeAndShiftedChar KeyboardCodeFromCharCode(char16_t c) {
} // namespace
ui::KeyboardCode KeyboardCodeFromStr(base::StringPiece str,
absl::optional<char16_t>* shifted_char) {
std::optional<char16_t>* shifted_char) {
auto const [code, shifted] =
str.size() == 1 ? KeyboardCodeFromCharCode(base::ToLowerASCII(str[0]))
: KeyboardCodeFromKeyIdentifier(base::ToLowerASCII(str));