mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +00:00
Chess: Don't use Vector in a literal iterator
This commit is contained in:
parent
a79a9fb692
commit
1a8c8d2383
2 changed files with 3 additions and 3 deletions
|
@ -138,7 +138,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto board_theme_menu = TRY(style_menu->try_add_submenu("Board Theme"));
|
||||
board_theme_menu->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/chess/mini-board.png").release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
for (auto& theme : Vector({ "Beige", "Green", "Blue" })) {
|
||||
for (auto const& theme : { "Beige", "Green", "Blue" }) {
|
||||
auto action = GUI::Action::create_checkable(theme, [&](auto& action) {
|
||||
widget->set_board_theme(action.text());
|
||||
widget->update();
|
||||
|
@ -171,7 +171,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
GUI::ActionGroup engines_action_group;
|
||||
engines_action_group.set_exclusive(true);
|
||||
auto engine_submenu = TRY(engine_menu->try_add_submenu("&Engine"));
|
||||
for (auto& engine : Vector({ "Human", "ChessEngine" })) {
|
||||
for (auto const& engine : { "Human", "ChessEngine" }) {
|
||||
auto action = GUI::Action::create_checkable(engine, [&](auto& action) {
|
||||
if (action.text() == "Human") {
|
||||
widget->set_engine(nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue