Skip to content

Commit

Permalink
Fix warnings in Clang 15 by qualifying std::move.
Browse files Browse the repository at this point in the history
  • Loading branch information
foxik committed Nov 15, 2023
1 parent 5ae2b75 commit dd90398
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/parsito/transition/transition_system_swap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ unique_ptr<transition_oracle::tree_oracle> transition_system_swap_oracle_static:
create_projective_component(t, node, projective_components, node);
}

return unique_ptr<transition_oracle::tree_oracle>(new tree_oracle_static(labels, root_label, gold, move(projective_order), move(projective_components)));
return unique_ptr<transition_oracle::tree_oracle>(new tree_oracle_static(labels, root_label, gold, std::move(projective_order), move(projective_components)));
}

void transition_system_swap_oracle_static::create_projective_order(const tree& gold, int node, vector<int>& projective_order, int& projective_index) const {
Expand Down
6 changes: 3 additions & 3 deletions src/sentence/input_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,21 +452,21 @@ bool input_format_presegmented_tokenizer::next_sentence(sentence& s, string& err
// Append words
size_t words = s.words.size() - 1;
for (size_t i = 1; i < partial.words.size(); i++) {
s.words.push_back(move(partial.words[i]));
s.words.push_back(std::move(partial.words[i]));
s.words.back().id += words;
if (s.words.back().head > 0) s.words.back().head += words;
}

// Append multiword_tokens
for (auto&& multiword_token : partial.multiword_tokens) {
s.multiword_tokens.push_back(move(multiword_token));
s.multiword_tokens.push_back(std::move(multiword_token));
s.multiword_tokens.back().id_first += words;
s.multiword_tokens.back().id_last += words;
}

// Append empty nodes
for (auto&& empty_node : partial.empty_nodes) {
s.empty_nodes.push_back(move(empty_node));
s.empty_nodes.push_back(std::move(empty_node));
s.empty_nodes.back().id += words;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/sentence/sentence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void sentence::set_comment(string_piece name, string_piece value) {
for (size_t i = 0; i < value.len; i++)
comment.push_back(value.str[i] == '\r' || value.str[i] == '\n' ? ' ' : value.str[i]);
}
comments.push_back(move(comment));
comments.push_back(std::move(comment));
}


Expand Down

0 comments on commit dd90398

Please sign in to comment.