From 18af13b88ba580562981a190c25da128a2e9db26 Mon Sep 17 00:00:00 2001 From: Eugene Kosov <claprix@yandex.ru> Date: Tue, 3 Sep 2019 16:31:10 +0300 Subject: [PATCH] [NFC] range-forify loops --- storage/innobase/handler/handler0alter.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 14d6527b764..f280c735e05 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -10287,25 +10287,21 @@ commit_cache_norebuild( col_set drop_list; col_set v_drop_list; - col_set::const_iterator col_it; /* Check if the column, part of an index to be dropped is part of any other index which is not being dropped. If it so, then set the ord_part of the column to 0. */ collect_columns_from_dropped_indexes(ctx, drop_list, v_drop_list); - for (col_it = drop_list.begin(); col_it != drop_list.end(); ++col_it) { - if (!check_col_exists_in_indexes(ctx->new_table, - *col_it, false)) { - ctx->new_table->cols[*col_it].ord_part = 0; + for (ulint col : drop_list) { + if (!check_col_exists_in_indexes(ctx->new_table, col, false)) { + ctx->new_table->cols[col].ord_part = 0; } } - for (col_it = v_drop_list.begin(); - col_it != v_drop_list.end(); ++col_it) { - if (!check_col_exists_in_indexes(ctx->new_table, - *col_it, true)) { - ctx->new_table->v_cols[*col_it].m_col.ord_part = 0; + for (ulint col : v_drop_list) { + if (!check_col_exists_in_indexes(ctx->new_table, col, true)) { + ctx->new_table->v_cols[col].m_col.ord_part = 0; } }