lebeg commented on a change in pull request #12356: [MXNET-860] Use modernized ranged loops where possible URL: https://github.com/apache/incubator-mxnet/pull/12356#discussion_r222134518
########## File path: src/c_api/c_api_symbolic.cc ########## @@ -268,8 +268,8 @@ int MXSymbolListAttr(SymbolHandle symbol, } *out_size = attr_list.size()/2; ret->ret_vec_charp.clear(); - for (size_t i = 0; i < attr_list.size(); ++i) { - ret->ret_vec_charp.push_back(attr_list[i].c_str()); + for (auto &attr : attr_list) { Review comment: Event better would be: ```cpp for (const auto &attr : attr_list) { ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services