Skip to content

Commit

Permalink
move from absl::optional to std::optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Apr 17, 2024
1 parent 88cb147 commit f2e94ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/menuitem/menuitem_views.cc
Expand Up @@ -110,7 +110,7 @@ void MenuItem::Create(const base::Value::Dict& option) {
if (icon && !icon->empty())
SetIcon(*icon);

absl::optional<int> menu_id = option.FindInt("submenu");
std::optional<int> menu_id = option.FindInt("submenu");
if (menu_id)
SetSubmenu(object_manager()->GetApiObject<Menu>(*menu_id));
}
Expand Down
4 changes: 2 additions & 2 deletions src/api/tray/tray.cc
Expand Up @@ -38,7 +38,7 @@ Tray::Tray(int id,
if (title)
SetTitle(*title);

absl::optional<bool> areTemplates = option.FindBool("iconsAreTemplates");
std::optional<bool> areTemplates = option.FindBool("iconsAreTemplates");
if (areTemplates)
SetIconsAreTemplates(*areTemplates);

Expand All @@ -54,7 +54,7 @@ Tray::Tray(int id,
if (tooltip)
SetTooltip(*tooltip);

absl::optional<int> menu_id = option.FindInt("menu");
std::optional<int> menu_id = option.FindInt("menu");
if (menu_id)
SetMenu(object_manager->GetApiObject<Menu>(*menu_id));

Expand Down

0 comments on commit f2e94ea

Please sign in to comment.