diff --git a/src/Dependency.cpp b/src/Dependency.cpp index 5b4baf9..99ff049 100644 --- a/src/Dependency.cpp +++ b/src/Dependency.cpp @@ -176,8 +176,7 @@ void Dependency::print() { std::cout << "\n * " << filename << " from " << prefix << "\n"; - const int symamount = symlinks.size(); - for (int n=0; n " << symlinks[n] << "\n";; } @@ -202,9 +201,8 @@ void Dependency::addSymlink(std::string s) bool Dependency::mergeIfSameAs(Dependency& dep2) { if (dep2.getOriginalFileName().compare(filename) == 0) { - const int samount = getSymlinkAmount(); - for (int n=0; n paths; - - // if some libs are missing prefixes, this will be set to true - // more stuff will then be necessary to do - // bool missing_prefixes; }; #endif diff --git a/src/DylibBundler.cpp b/src/DylibBundler.cpp index b3a0363..aa4a883 100644 --- a/src/DylibBundler.cpp +++ b/src/DylibBundler.cpp @@ -16,9 +16,10 @@ std::vector deps; std::map> deps_per_file; +std::map deps_collected; +std::set frameworks; std::set rpaths; std::map> rpaths_per_file; -std::map deps_collected; void changeLibPathsOnFile(std::string file_to_fix) { @@ -29,7 +30,7 @@ void changeLibPathsOnFile(std::string file_to_fix) std::vector deps_in_file = deps_per_file[file_to_fix]; const int dep_amount = deps_in_file.size(); - for (int n=0; n deps_in_file = deps_per_file[filename]; bool in_deps_per_file = false; - for (int n=0; n lines; collectDependencies(filename, lines); - const int line_amount = lines.size(); - for (int n=0; n lines; collectDependencies(original_path, lines); - const int line_amount = lines.size(); - for (int n=0; n files; void addFileToFix(std::string path) { files.push_back(path); } -int fileToFixAmount() { return files.size(); } std::string fileToFix(const int n) { return files[n]; } std::vector filesToFix() { return files; } +size_t filesToFixCount() { return files.size(); } std::string insideLibPath() { return inside_path_str; } void insideLibPath(std::string p) @@ -61,8 +61,7 @@ void ignorePrefix(std::string prefix) bool isPrefixIgnored(std::string prefix) { - const int prefix_amount = prefixes_to_ignore.size(); - for (int n=0; n searchPaths; void addSearchPath(std::string path) { searchPaths.push_back(path); } -int searchPathAmount() { return searchPaths.size(); } +int searchPathCount() { return searchPaths.size(); } std::string searchPath(const int n) { return searchPaths[n]; } bool quietOutput() { return quiet_output; } diff --git a/src/Settings.h b/src/Settings.h index 226003b..32c0fa0 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -29,15 +29,15 @@ std::string destFolder(); void destFolder(std::string path); void addFileToFix(std::string path); -int fileToFixAmount(); std::string fileToFix(int n); std::vector filesToFix(); +size_t filesToFixCount(); std::string insideLibPath(); void insideLibPath(std::string p); void addSearchPath(std::string path); -int searchPathAmount(); +int searchPathCount(); std::string searchPath(int n); bool quietOutput(); diff --git a/src/Utils.cpp b/src/Utils.cpp index 493710b..20f8704 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -134,8 +134,8 @@ int systemp(const std::string& cmd) std::string getUserInputDirForFile(const std::string& filename) { - const int searchPathAmount = Settings::searchPathAmount(); - for (int n=0; n