Skip to content

Commit f421600

Browse files
Fix the remaining -Wunqualified-std-cast-call warnings (#1305)
Summary: This is follow-up to 023fcdb332cf6502b2e34188cc6a91dc685b0174, handling the differences between the current codebase and the one at that commit's time. Pull Request resolved: #1305 Reviewed By: hermanlee Differential Revision: D45658637 Pulled By: sunshine-Chun fbshipit-source-id: 2054aa3
1 parent ff31177 commit f421600

File tree

3 files changed

+47
-46
lines changed

3 files changed

+47
-46
lines changed

sql/join_optimizer/access_path.cc

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
462462
return nullptr;
463463
}
464464
}
465-
iterator = NewIterator<ZeroRowsIterator>(thd, mem_root, move(child));
465+
iterator = NewIterator<ZeroRowsIterator>(thd, mem_root, std::move(child));
466466
break;
467467
}
468468
case AccessPath::ZERO_ROWS_AGGREGATED:
@@ -479,7 +479,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
479479
}
480480
iterator = NewIterator<MaterializedTableFunctionIterator>(
481481
thd, mem_root, param.table_function, param.table,
482-
move(table_iterator));
482+
std::move(table_iterator));
483483
break;
484484
}
485485
case AccessPath::UNQUALIFIED_COUNT:
@@ -497,9 +497,9 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
497497
if (inner == nullptr) {
498498
return nullptr;
499499
}
500-
iterator = NewIterator<NestedLoopIterator>(thd, mem_root, move(outer),
501-
move(inner), param.join_type,
502-
param.pfs_batch_mode);
500+
iterator = NewIterator<NestedLoopIterator>(
501+
thd, mem_root, std::move(outer), std::move(inner), param.join_type,
502+
param.pfs_batch_mode);
503503
break;
504504
}
505505
case AccessPath::NESTED_LOOP_SEMIJOIN_WITH_DUPLICATE_REMOVAL: {
@@ -515,8 +515,8 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
515515
return nullptr;
516516
}
517517
iterator = NewIterator<NestedLoopSemiJoinWithDuplicateRemovalIterator>(
518-
thd, mem_root, move(outer), move(inner), param.table, param.key,
519-
param.key_len);
518+
thd, mem_root, std::move(outer), std::move(inner), param.table,
519+
param.key, param.key_len);
520520
break;
521521
}
522522
case AccessPath::BKA_JOIN: {
@@ -538,11 +538,11 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
538538
MultiRangeRowIterator *mrr_iterator = down_cast<MultiRangeRowIterator *>(
539539
mrr_path->iterator->real_iterator());
540540
iterator = NewIterator<BKAIterator>(
541-
thd, mem_root, move(outer),
541+
thd, mem_root, std::move(outer),
542542
GetUsedTables(param.outer, /*include_pruned_tables=*/true),
543-
move(inner), thd->variables.join_buff_size, param.mrr_length_per_rec,
544-
param.rec_per_key, param.store_rowids, param.tables_to_get_rowid_for,
545-
mrr_iterator, param.join_type);
543+
std::move(inner), thd->variables.join_buff_size,
544+
param.mrr_length_per_rec, param.rec_per_key, param.store_rowids,
545+
param.tables_to_get_rowid_for, mrr_iterator, param.join_type);
546546
break;
547547
}
548548
case AccessPath::HASH_JOIN: {
@@ -608,12 +608,12 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
608608
: nullptr;
609609

610610
iterator = NewIterator<HashJoinIterator>(
611-
thd, mem_root, move(inner),
611+
thd, mem_root, std::move(inner),
612612
GetUsedTables(param.inner, /*include_pruned_tables=*/true),
613-
estimated_build_rows, move(outer),
613+
estimated_build_rows, std::move(outer),
614614
GetUsedTables(param.outer, /*include_pruned_tables=*/true),
615615
param.store_rowids, param.tables_to_get_rowid_for,
616-
thd->variables.join_buff_size, move(conditions),
616+
thd->variables.join_buff_size, std::move(conditions),
617617
param.allow_spill_to_disk, join_type,
618618
join_predicate->expr->join_conditions, probe_input_batch_mode,
619619
hash_table_generation);
@@ -626,7 +626,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
626626
if (child == nullptr) {
627627
return nullptr;
628628
}
629-
iterator = NewIterator<FilterIterator>(thd, mem_root, move(child),
629+
iterator = NewIterator<FilterIterator>(thd, mem_root, std::move(child),
630630
param.condition);
631631
break;
632632
}
@@ -642,7 +642,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
642642
: lrint(param.child->num_output_rows);
643643
Filesort *filesort = param.filesort;
644644
iterator = NewIterator<SortingIterator>(
645-
thd, mem_root, filesort, move(child), num_rows_estimate,
645+
thd, mem_root, filesort, std::move(child), num_rows_estimate,
646646
param.tables_to_get_rowid_for, examined_rows);
647647
if (filesort->m_remove_duplicates) {
648648
filesort->tables[0]->duplicate_removal_iterator =
@@ -663,7 +663,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
663663
Prealloced_array<TABLE *, 4> tables =
664664
GetUsedTables(param.child, /*include_pruned_tables=*/true);
665665
iterator = NewIterator<AggregateIterator>(
666-
thd, mem_root, move(child), join,
666+
thd, mem_root, std::move(child), join,
667667
TableCollection(tables, /*store_rowids=*/false,
668668
/*tables_to_get_rowid_for=*/0),
669669
param.rollup);
@@ -684,8 +684,8 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
684684
return nullptr;
685685
}
686686
iterator = NewIterator<TemptableAggregateIterator>(
687-
thd, mem_root, move(subquery_iterator), param.temp_table_param,
688-
param.table, move(table_iterator), join, param.ref_slice);
687+
thd, mem_root, std::move(subquery_iterator), param.temp_table_param,
688+
param.table, std::move(table_iterator), join, param.ref_slice);
689689
break;
690690
}
691691
case AccessPath::LIMIT_OFFSET: {
@@ -702,7 +702,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
702702
send_records = &join->send_records;
703703
}
704704
iterator = NewIterator<LimitOffsetIterator>(
705-
thd, mem_root, move(child), param.limit, param.offset,
705+
thd, mem_root, std::move(child), param.limit, param.offset,
706706
param.count_all_rows, param.reject_multiple_rows, send_records);
707707
break;
708708
}
@@ -714,7 +714,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
714714
return nullptr;
715715
}
716716
iterator = NewIterator<StreamingIterator>(
717-
thd, mem_root, move(child), param.temp_table_param, param.table,
717+
thd, mem_root, std::move(child), param.temp_table_param, param.table,
718718
param.provide_rowid, param.join, param.ref_slice);
719719
break;
720720
}
@@ -776,7 +776,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
776776
JOIN *subjoin = param->ref_slice == -1 ? nullptr : query_blocks[0].join;
777777
iterator = NewIterator<MaterializeIterator>(
778778
thd, mem_root, std::move(query_blocks), param->table,
779-
move(table_iterator), param->cte, param->unit, subjoin,
779+
std::move(table_iterator), param->cte, param->unit, subjoin,
780780
param->ref_slice, param->rematerialize, param->limit_rows,
781781
param->reject_multiple_rows);
782782

@@ -804,7 +804,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
804804
return nullptr;
805805
}
806806
iterator = NewIterator<MaterializeInformationSchemaTableIterator>(
807-
thd, mem_root, move(table_iterator), param.table_list,
807+
thd, mem_root, std::move(table_iterator), param.table_list,
808808
param.condition);
809809
break;
810810
}
@@ -820,7 +820,8 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
820820
return nullptr;
821821
}
822822
}
823-
iterator = NewIterator<AppendIterator>(thd, mem_root, move(children));
823+
iterator =
824+
NewIterator<AppendIterator>(thd, mem_root, std::move(children));
824825
break;
825826
}
826827
case AccessPath::WINDOW: {
@@ -832,10 +833,10 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
832833
}
833834
if (param.needs_buffering) {
834835
iterator = NewIterator<BufferingWindowIterator>(
835-
thd, mem_root, move(child), param.temp_table_param, join,
836+
thd, mem_root, std::move(child), param.temp_table_param, join,
836837
param.ref_slice);
837838
} else {
838-
iterator = NewIterator<WindowIterator>(thd, mem_root, move(child),
839+
iterator = NewIterator<WindowIterator>(thd, mem_root, std::move(child),
839840
param.temp_table_param, join,
840841
param.ref_slice);
841842
}
@@ -848,7 +849,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
848849
if (child == nullptr) {
849850
return nullptr;
850851
}
851-
iterator = NewIterator<WeedoutIterator>(thd, mem_root, move(child),
852+
iterator = NewIterator<WeedoutIterator>(thd, mem_root, std::move(child),
852853
param.weedout_table,
853854
param.tables_to_get_rowid_for);
854855
break;
@@ -861,7 +862,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
861862
return nullptr;
862863
}
863864
iterator = NewIterator<RemoveDuplicatesIterator>(
864-
thd, mem_root, move(child), join, param.group_items,
865+
thd, mem_root, std::move(child), join, param.group_items,
865866
param.group_items_size);
866867
break;
867868
}
@@ -873,7 +874,7 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
873874
return nullptr;
874875
}
875876
iterator = NewIterator<RemoveDuplicatesOnIndexIterator>(
876-
thd, mem_root, move(child), param.table, param.key,
877+
thd, mem_root, std::move(child), param.table, param.key,
877878
param.loosescan_key_len);
878879
break;
879880
}
@@ -891,8 +892,8 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
891892
return nullptr;
892893
}
893894
iterator = NewIterator<AlternativeIterator>(
894-
thd, mem_root, param.table_scan_path->table_scan().table, move(child),
895-
move(table_scan_iterator), param.used_ref);
895+
thd, mem_root, param.table_scan_path->table_scan().table,
896+
std::move(child), std::move(table_scan_iterator), param.used_ref);
896897
break;
897898
}
898899
case AccessPath::CACHE_INVALIDATOR: {
@@ -902,8 +903,8 @@ unique_ptr_destroy_only<RowIterator> CreateIteratorFromAccessPath(
902903
if (child == nullptr) {
903904
return nullptr;
904905
}
905-
iterator = NewIterator<CacheInvalidatorIterator>(thd, mem_root,
906-
move(child), param.name);
906+
iterator = NewIterator<CacheInvalidatorIterator>(
907+
thd, mem_root, std::move(child), param.name);
907908
break;
908909
}
909910
case AccessPath::DELETE_ROWS: {

sql/join_optimizer/explain_access_path.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
489489
}
490490
str += table->file->explain_extra();
491491

492-
description.push_back(move(str));
492+
description.push_back(std::move(str));
493493
AddChildrenFromPushedCondition(table, &children);
494494
break;
495495
}
@@ -509,7 +509,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
509509
ItemToString(table->file->pushed_idx_cond);
510510
}
511511
str += table->file->explain_extra();
512-
description.push_back(move(str));
512+
description.push_back(std::move(str));
513513
AddChildrenFromPushedCondition(table, &children);
514514
break;
515515
}
@@ -527,7 +527,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
527527
ItemToString(table->file->pushed_idx_cond);
528528
}
529529
str += table->file->explain_extra();
530-
description.push_back(move(str));
530+
description.push_back(std::move(str));
531531
AddChildrenFromPushedCondition(table, &children);
532532
break;
533533
}
@@ -544,7 +544,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
544544
ItemToString(table->file->pushed_idx_cond);
545545
}
546546
str += table->file->explain_extra();
547-
description.push_back(move(str));
547+
description.push_back(std::move(str));
548548
AddChildrenFromPushedCondition(table, &children);
549549
break;
550550
}
@@ -564,7 +564,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
564564
RefToString(*path->pushed_join_ref().ref, key,
565565
/*include_nulls=*/false) +
566566
")" + table->file->explain_extra();
567-
description.push_back(move(str));
567+
description.push_back(std::move(str));
568568
break;
569569
}
570570
case AccessPath::FULL_TEXT_SEARCH: {
@@ -600,7 +600,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
600600
ItemToString(table->file->pushed_idx_cond);
601601
}
602602
str += table->file->explain_extra();
603-
description.push_back(move(str));
603+
description.push_back(std::move(str));
604604
AddChildrenFromPushedCondition(table, &children);
605605
break;
606606
}
@@ -673,7 +673,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
673673
ItemToString(table->file->pushed_idx_cond);
674674
}
675675
str += table->file->explain_extra();
676-
description.push_back(move(str));
676+
description.push_back(std::move(str));
677677
AddChildrenFromPushedCondition(table, &children);
678678
break;
679679
}
@@ -753,7 +753,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
753753
ret += ItemToString(cond);
754754
}
755755

756-
description.push_back(move(ret));
756+
description.push_back(std::move(ret));
757757
children.push_back({path->hash_join().outer});
758758
children.push_back({path->hash_join().inner, "Hash"});
759759
break;
@@ -798,7 +798,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
798798
path->sort().filesort->limit);
799799
ret += buf;
800800
}
801-
description.push_back(move(ret));
801+
description.push_back(std::move(ret));
802802
children.push_back({path->sort().child});
803803
break;
804804
}
@@ -830,7 +830,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
830830
ret += ItemToString(*item);
831831
}
832832
}
833-
description.push_back(move(ret));
833+
description.push_back(std::move(ret));
834834
children.push_back({path->aggregate().child});
835835
break;
836836
}
@@ -914,7 +914,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
914914
first = false;
915915
}
916916
}
917-
description.push_back(move(buf));
917+
description.push_back(std::move(buf));
918918
children.push_back({path->window().child});
919919
break;
920920
}
@@ -989,7 +989,7 @@ ExplainData ExplainAccessPath(const AccessPath *path, JOIN *join) {
989989
ret += ")";
990990
}
991991
ret += " IS NULL";
992-
description.push_back(move(ret));
992+
description.push_back(std::move(ret));
993993
children.push_back({path->alternative().child});
994994
children.push_back({path->alternative().table_scan_path});
995995
break;

sql/sql_delete.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ bool Query_result_delete::optimize() {
10221022
auto tempfile = make_unique_destroy_only<Unique>(
10231023
thd->mem_root, refpos_order_cmp, table->file, table->file->ref_length,
10241024
thd->variables.sortbuff_size);
1025-
if (tempfile == nullptr || tempfiles.push_back(move(tempfile)) ||
1025+
if (tempfile == nullptr || tempfiles.push_back(std::move(tempfile)) ||
10261026
tables.push_back(table)) {
10271027
return true; /* purecov: inspected */
10281028
}

0 commit comments

Comments
 (0)