Use of auto that causes a copy
Change-Id: Id308b78bc42bba876c4f83d85f407ed4e4a0ce1a
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
}
for (auto& entry :
boost::make_iterator_range(bf::directory_iterator(pkg_path), {})) {
}
for (auto& entry :
boost::make_iterator_range(bf::directory_iterator(pkg_path), {})) {
- auto path = entry.path();
+ const auto& path = entry.path();
if (skip_symlink && bf::is_symlink(symlink_status(path)))
continue;
if (skip_symlink && bf::is_symlink(symlink_status(path)))
continue;
return false;
for (auto& bin_entry :
boost::make_iterator_range(bf::directory_iterator(path), {})) {
return false;
for (auto& bin_entry :
boost::make_iterator_range(bf::directory_iterator(path), {})) {
- auto bin_path = bin_entry.path();
+ const auto& bin_path = bin_entry.path();
if (bf::is_symlink(symlink_status(bin_path)))
continue;
if (bf::is_symlink(symlink_status(bin_path)))
continue;
return false;
for (auto& lib_entry :
boost::make_iterator_range(bf::directory_iterator(path), {})) {
return false;
for (auto& lib_entry :
boost::make_iterator_range(bf::directory_iterator(path), {})) {
- auto lib_path = lib_entry.path();
+ const auto& lib_path = lib_entry.path();
if (bf::is_symlink(symlink_status(lib_path)))
continue;
if (bf::is_symlink(symlink_status(lib_path)))
continue;