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:
parent
fac964ac0d
commit
892c9d78a3
129 changed files with 419 additions and 397 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue