]> git.ipfire.org Git - thirdparty/gcc.git/commit
Micro-optimization to avoid creating temporary path
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Dec 2018 15:52:37 +0000 (15:52 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Dec 2018 15:52:37 +0000 (15:52 +0000)
commit54df0933b208c1129811b3e3cf21da56cf060378
treef7b3487499bd4adf281125049532d674e613ecdc
parentb37e7cb040de2f336999eeb84cc26254d8ab8766
Micro-optimization to avoid creating temporary path

Now that path::operator/=(basic_string_view<value_type>) works directly
from the string argument, instead of constructing a temporary path from
the string, it's potentially more efficient to do 'path(x) /= s' instead
of 'x / s'. This changes the only relevant place in the library.

* src/filesystem/std-dir.cc (filesystem::_Dir::advance): Append
string to lvalue to avoid creating temporary path.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267236 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/src/filesystem/std-dir.cc