Skip to content

Commit

Permalink
add move when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Nov 6, 2024
1 parent c748e89 commit 203174b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ static void ReaddirRecursiveSync(const FunctionCallbackInfo<Value>& args) {
full_path += ent.name;

if (with_file_types) {
paths.push_back(current_path);
paths.push_back(std::move(current_path));
names.emplace_back(ent.name);
types.push_back(static_cast<int>(ent.type));
} else {
Expand All @@ -2150,7 +2150,7 @@ static void ReaddirRecursiveSync(const FunctionCallbackInfo<Value>& args) {
}
#endif
if (start_pos < full_path_length) {
relative_paths.emplace_back(full_path.substr(start_pos));
relative_paths.emplace_back(std::move(full_path.substr(start_pos)));
}
}
}
Expand Down

0 comments on commit 203174b

Please sign in to comment.