mirror of git://gcc.gnu.org/git/gcc.git
Fix previous commit to move instead of copying
* src/filesystem/std-dir.cc (filesystem::_Dir::advance): Move new path instead of copying. From-SVN: r267237
This commit is contained in:
parent
8d53154813
commit
fb601354e1
|
|
@ -1,5 +1,8 @@
|
|||
2018-12-18 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* src/filesystem/std-dir.cc (filesystem::_Dir::advance): Move new
|
||||
path instead of copying.
|
||||
|
||||
* src/filesystem/std-dir.cc (filesystem::_Dir::advance): Append
|
||||
string to lvalue to avoid creating temporary path.
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct fs::_Dir : _Dir_base
|
|||
{
|
||||
auto name = path;
|
||||
name /= entp->d_name;
|
||||
entry = fs::directory_entry{name, get_file_type(*entp)};
|
||||
entry = fs::directory_entry{std::move(name), get_file_type(*entp)};
|
||||
return true;
|
||||
}
|
||||
else if (!ec)
|
||||
|
|
|
|||
Loading…
Reference in New Issue