mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-24 19:43:33 +01:00
[vcpkg] Use fmap instead of std::transform.
This commit is contained in:
parent
162e9ce98f
commit
05c9f77a4a
@ -116,9 +116,8 @@ namespace vcpkg::Commands::Install
|
||||
static ImmutableSortedVector<std::string> build_list_of_package_files(const fs::path& package_dir)
|
||||
{
|
||||
const std::vector<fs::path> package_file_paths = Files::recursive_find_all_files_in_dir(package_dir);
|
||||
std::vector<std::string> package_files;
|
||||
const size_t package_remove_char_count = package_dir.generic_string().size() + 1; // +1 for the slash
|
||||
std::transform(package_file_paths.cbegin(), package_file_paths.cend(), std::back_inserter(package_files), [package_remove_char_count](const fs::path& path)
|
||||
auto package_files = Util::fmap(package_file_paths, [package_remove_char_count](const fs::path& path)
|
||||
{
|
||||
std::string as_string = path.generic_string();
|
||||
as_string.erase(0, package_remove_char_count);
|
||||
|
Loading…
x
Reference in New Issue
Block a user