Skip to content

Commit

Permalink
ARROW-10490: [C++][GLib] Fix range-loop-analysis warnings
Browse files Browse the repository at this point in the history
They are detected by Xcode 12.

Closes #8587 from kou/xcode-12

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou committed Nov 4, 2020
1 parent 3a87324 commit b4ddc96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions c_glib/arrow-glib/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ garrow_csv_read_options_add_schema(GArrowCSVReadOptions *options,
{
auto priv = GARROW_CSV_READ_OPTIONS_GET_PRIVATE(options);
auto arrow_schema = garrow_schema_get_raw(schema);
for (const auto field : arrow_schema->fields()) {
for (const auto &field : arrow_schema->fields()) {
priv->convert_options.column_types[field->name()] = field->type();
}
}
Expand All @@ -1206,7 +1206,7 @@ garrow_csv_read_options_get_column_types(GArrowCSVReadOptions *options)
g_str_equal,
g_free,
g_object_unref);
for (const auto iter : priv->convert_options.column_types) {
for (const auto &iter : priv->convert_options.column_types) {
auto arrow_name = iter.first;
auto arrow_data_type = iter.second;
g_hash_table_insert(types,
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/plasma/protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Status ReadListReply(const uint8_t* data, size_t size, ObjectTable* objects) {
DCHECK(data);
auto message = flatbuffers::GetRoot<fb::PlasmaListReply>(data);
DCHECK(VerifyFlatbuffer(message, data, size));
for (auto const& object : *message->objects()) {
for (auto const object : *message->objects()) {
ObjectID object_id = ObjectID::from_binary(object->object_id()->str());
auto entry = std::unique_ptr<ObjectTableEntry>(new ObjectTableEntry());
entry->data_size = object->data_size();
Expand Down

0 comments on commit b4ddc96

Please sign in to comment.