From c368e079ca27195aa7dbed1e834479ab17ccae73 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 May 2017 15:34:03 +0200 Subject: [PATCH] resolve-system-dependencies: Simplify --- .../resolve-system-dependencies.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc index b04595732..aadfdc947 100644 --- a/src/resolve-system-dependencies/resolve-system-dependencies.cc +++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc @@ -28,15 +28,6 @@ std::set readCacheFile(const Path & file) return tokenizeString>(readFile(file), "\n"); } -void writeCacheFile(const Path & file, std::set & deps) -{ - std::ofstream fp; - fp.open(file); - for (auto & d : deps) - fp << d << "\n"; - fp.close(); -} - std::string findDylibName(bool should_swap, ptrdiff_t dylib_command_start) { struct dylib_command *dylc = (struct dylib_command*)dylib_command_start; @@ -167,7 +158,7 @@ std::set getPath(const Path & path) for (auto & t : resolveTree(nextPath, deps)) paths.insert(t); - writeCacheFile(cacheFile, paths); + writeFile(cacheFile, concatStringsSep("\n", paths)); return paths; }