diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-12-18 15:52:37 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-12-18 15:52:37 +0000 |
commit | 8d53154813367d0745c89f975b8dbc00bd032afc (patch) | |
tree | f7b3487499bd4adf281125049532d674e613ecdc /gcc/rtlhooks.c | |
parent | 36313a6bce37f7eabc64c66f216ff0b2adb12ed7 (diff) | |
download | gcc-8d53154813367d0745c89f975b8dbc00bd032afc.zip gcc-8d53154813367d0745c89f975b8dbc00bd032afc.tar.gz gcc-8d53154813367d0745c89f975b8dbc00bd032afc.tar.bz2 |
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.
From-SVN: r267236
Diffstat (limited to 'gcc/rtlhooks.c')
0 files changed, 0 insertions, 0 deletions