Skip to content

Commit

Permalink
resolve-system-dependencies: Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed May 31, 2017
1 parent 44f3f80 commit c368e07
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/resolve-system-dependencies/resolve-system-dependencies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ std::set<string> readCacheFile(const Path & file)
return tokenizeString<set<string>>(readFile(file), "\n");
}

void writeCacheFile(const Path & file, std::set<string> & 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;
Expand Down Expand Up @@ -167,7 +158,7 @@ std::set<string> getPath(const Path & path)
for (auto & t : resolveTree(nextPath, deps))
paths.insert(t);

writeCacheFile(cacheFile, paths);
writeFile(cacheFile, concatStringsSep("\n", paths));

return paths;
}
Expand Down

0 comments on commit c368e07

Please sign in to comment.