diff options
| author | Nicole Mazzuca <t-nimaz@microsoft.com> | 2019-07-10 17:39:04 -0700 |
|---|---|---|
| committer | Nicole Mazzuca <t-nimaz@microsoft.com> | 2019-07-11 18:20:36 -0700 |
| commit | bb579072077153fabfa74acec852bce222265357 (patch) | |
| tree | 835caef7d03a7ec3919763547f3d293cff895478 /toolsrc/src | |
| parent | 5b76f24f35976739991941d3b6289fb78fd93648 (diff) | |
| download | vcpkg-bb579072077153fabfa74acec852bce222265357.tar.gz vcpkg-bb579072077153fabfa74acec852bce222265357.zip | |
make it compile on macos under g++6
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/base/files.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index f4c2106d4..8bc37819a 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -129,7 +129,7 @@ namespace vcpkg::Files file_stream.read(&output[0], length); file_stream.close(); - return std::move(output); + return output; } virtual Expected<std::vector<std::string>> read_lines(const fs::path& file_path) const override { @@ -147,7 +147,7 @@ namespace vcpkg::Files } file_stream.close(); - return std::move(output); + return output; } virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override @@ -372,9 +372,6 @@ namespace vcpkg::Files void operator()(const fs::path& current_path, tld& info, const queue& queue) const { std::error_code ec; - const auto type = fs::symlink_status(current_path, ec).type(); - if (check_ec(ec, info, queue)) return; - const auto tmp_name = Strings::b64url_encode(info.index++); const auto tmp_path = info.tmp_directory / tmp_name; @@ -387,16 +384,16 @@ namespace vcpkg::Files const auto path_type = fs::symlink_status(path, ec).type(); - std::atomic<std::uintmax_t> files_deleted = 0; + std::atomic<std::uintmax_t> files_deleted{0}; if (path_type == fs::file_type::directory) { std::uint64_t index = 0; std::mutex ec_mutex; - auto queue = remove::queue([&] { + remove::queue queue{[&] { index += static_cast<std::uint64_t>(1) << 32; return remove::tld{path, index, files_deleted, ec_mutex, ec}; - }); + }}; index += static_cast<std::uint64_t>(1) << 32; auto main_tld = remove::tld{path, index, files_deleted, ec_mutex, ec}; |
