diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc index 98c969437..4dd691981 100644 --- a/src/resolve-system-dependencies/resolve-system-dependencies.cc +++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc @@ -23,9 +23,9 @@ Path resolveCacheFile(Path lib) return cacheDir + "/" + lib; } -std::set readCacheFile(const Path & file) +std::set readCacheFile(const Path & file) { - return tokenizeString>(readFile(file), "\n"); + return tokenizeString>(readFile(file), "\n"); } std::set runResolver(const Path & filename) @@ -81,7 +81,7 @@ std::set runResolver(const Path & filename) bool should_swap = magic == MH_CIGAM_64; ptrdiff_t cmd_offset = mach64_offset + sizeof(mach_header_64); - std::set libs; + std::set libs; for (uint32_t i = 0; i < DO_SWAP(should_swap, m_header->ncmds); i++) { load_command * cmd = (load_command *) (obj + cmd_offset); switch(DO_SWAP(should_swap, cmd->cmd)) { @@ -110,9 +110,9 @@ Path resolveSymlink(const Path & path) : concatStrings(dirOf(path), "/", target); } -std::set resolveTree(const Path & path, PathSet & deps) +std::set resolveTree(const Path & path, PathSet & deps) { - std::set results; + std::set results; if (!deps.insert(path).second) return {}; for (auto & lib : runResolver(path)) { results.insert(lib); @@ -123,7 +123,7 @@ std::set resolveTree(const Path & path, PathSet & deps) return results; } -std::set getPath(const Path & path) +std::set getPath(const Path & path) { if (hasPrefix(path, "/dev")) return {}; @@ -131,7 +131,7 @@ std::set getPath(const Path & path) if (pathExists(cacheFile)) return readCacheFile(cacheFile); - std::set deps, paths; + std::set deps, paths; paths.insert(path); Path nextPath(path); @@ -180,7 +180,7 @@ int main(int argc, char ** argv) impurePaths.insert("/usr/lib/libSystem.dylib"); } - std::set allPaths; + std::set allPaths; for (auto & path : impurePaths) for (auto & p : getPath(path))