diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-15 18:24:06 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-15 18:24:06 -0800 |
| commit | 15ca6919ad7d5dd86596603663845b3ea84d0d3b (patch) | |
| tree | 0d4f514eeb6ab873fc3ac4bd747b11226a444a34 /toolsrc/src/vcpkg.cpp | |
| parent | e4548a8cf46b20b8e89ab75ee9201e3b244484ba (diff) | |
| download | vcpkg-15ca6919ad7d5dd86596603663845b3ea84d0d3b.tar.gz vcpkg-15ca6919ad7d5dd86596603663845b3ea84d0d3b.zip | |
Use Files::write_all_lines()
Diffstat (limited to 'toolsrc/src/vcpkg.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 6f1d30bc5..98c53f9ef 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -175,13 +175,7 @@ static void upgrade_to_slash_terminated_sorted_format(std::vector<std::string>* #if 0 // Replace the listfile on disk const fs::path updated_listfile_path = listfile_path.generic_string() + "_updated"; - std::fstream output(updated_listfile_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); - for (const std::string& line : *lines) - { - output << line << "\n"; - } - output.close(); - + Files::write_all_lines(updated_listfile_path, *lines); fs::rename(updated_listfile_path, listfile_path); #endif } |
