提交 e9e87ce7 编写于 作者: D dingminghui 提交者: jackzhang235

fix: compile error in c++98

before c++11: `iterator erase( iterator pos );`
after c++11: `iterator erase( const_iterator pos );`
上级 ccc79090
......@@ -801,8 +801,8 @@ void MLUPostprocessPass::AdjustSubgraph(Node* subgraph_node,
for (auto& input_arg : op_input_args) {
auto op_input = new_desc->Input(input_arg);
for (auto& it : i_names) {
auto index = std::find(op_input.cbegin(), op_input.cend(), it);
if (index != op_input.cend() &&
auto index = std::find(op_input.begin(), op_input.end(), it);
if (index != op_input.end() &&
node_replace.find(it) != node_replace.end()) {
index = op_input.erase(index);
op_input.emplace(index, node_replace.at(it));
......@@ -817,8 +817,8 @@ void MLUPostprocessPass::AdjustSubgraph(Node* subgraph_node,
for (auto& output_arg : op_output_args) {
auto op_output = new_desc->Output(output_arg);
for (auto& it : o_names) {
auto index = std::find(op_output.cbegin(), op_output.cend(), it);
if (index != op_output.cend() &&
auto index = std::find(op_output.begin(), op_output.end(), it);
if (index != op_output.end() &&
node_replace.find(it) != node_replace.end()) {
index = op_output.erase(index);
op_output.emplace(index, node_replace.at(it));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册