From c4ff430bd388f4ce9a9dd41e7afb4e8cc909df65 Mon Sep 17 00:00:00 2001 From: SCG82 Date: Fri, 3 Jan 2020 22:09:45 -0800 Subject: [PATCH] remove unneeded includes --- src/Dependency.cpp | 16 ---------------- src/Dependency.h | 2 ++ src/DylibBundler.cpp | 6 ------ src/DylibBundler.h | 2 ++ src/Settings.cpp | 1 - src/Settings.h | 4 ++++ src/Utils.cpp | 7 ------- src/Utils.h | 4 ++-- src/main.cpp | 5 ----- 9 files changed, 10 insertions(+), 37 deletions(-) diff --git a/src/Dependency.cpp b/src/Dependency.cpp index b520972..3462432 100644 --- a/src/Dependency.cpp +++ b/src/Dependency.cpp @@ -1,23 +1,7 @@ #include "Dependency.h" -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// #include "DylibBundler.h" #include "Settings.h" #include "Utils.h" diff --git a/src/Dependency.h b/src/Dependency.h index 1c719a3..0e731c0 100644 --- a/src/Dependency.h +++ b/src/Dependency.h @@ -1,3 +1,5 @@ +#pragma once + #ifndef _depend_h_ #define _depend_h_ diff --git a/src/DylibBundler.cpp b/src/DylibBundler.cpp index 5150db0..701087c 100644 --- a/src/DylibBundler.cpp +++ b/src/DylibBundler.cpp @@ -1,10 +1,7 @@ #include "DylibBundler.h" -#include -#include #include #include -#include #include #ifdef __linux #include @@ -19,8 +16,6 @@ std::map> deps_per_file; std::map deps_collected; std::set frameworks; std::set rpaths; -// std::map> rpaths_per_file; -// std::map rpath_to_fullpath; bool qt_plugins_called = false; void addDependency(std::string path, std::string dependent_file) @@ -91,7 +86,6 @@ void collectRpaths(const std::string& filename) parseLoadCommands(filename, std::string("LC_RPATH"), std::string("path"), lines); for (const auto& line : lines) { rpaths.insert(line); - // rpaths_per_file[filename].push_back(line); Settings::addRpathForFile(filename, line); if (Settings::verboseOutput()) std::cout << " rpath: " << line << std::endl; diff --git a/src/DylibBundler.h b/src/DylibBundler.h index c33af4e..86dc131 100644 --- a/src/DylibBundler.h +++ b/src/DylibBundler.h @@ -1,3 +1,5 @@ +#pragma once + #ifndef _DYLIB_BUNDLER_H_ #define _DYLIB_BUNDLER_H_ diff --git a/src/Settings.cpp b/src/Settings.cpp index 8711322..8484565 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -84,7 +84,6 @@ std::string insideLibPath() { return inside_path; } void insideLibPath(std::string p) { inside_path = p; - // fix path if needed so it ends with '/' if (inside_path[inside_path.size()-1] != '/') inside_path += "/"; } diff --git a/src/Settings.h b/src/Settings.h index 7802021..d8697f5 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -1,3 +1,5 @@ +#pragma once + #ifndef _settings_ #define _settings_ @@ -73,3 +75,5 @@ bool fileHasRpath(const std::string& file); } // namespace Settings #endif + +std::string stripLSlash(const std::string& in); diff --git a/src/Utils.cpp b/src/Utils.cpp index ca2e94f..55cc951 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -1,17 +1,12 @@ #include "Utils.h" -#include -#include #include #include #include #include -#include -#include #include -#include "Dependency.h" #include "Settings.h" std::string filePrefix(const std::string& in) @@ -41,7 +36,6 @@ std::string stripLSlash(const std::string& in) return in; } -// trim from end (in place) void rtrim_in_place(std::string& s) { s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char c) { @@ -49,7 +43,6 @@ void rtrim_in_place(std::string& s) }).base(), s.end()); } -// trim from end (copying) std::string rtrim(std::string s) { rtrim_in_place(s); diff --git a/src/Utils.h b/src/Utils.h index 94dcb48..3f0af29 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -1,11 +1,11 @@ +#pragma once + #ifndef _utils_h_ #define _utils_h_ #include #include -// class Library; - std::string filePrefix(const std::string& in); std::string stripPrefix(const std::string& in); diff --git a/src/main.cpp b/src/main.cpp index adc3394..145cbc4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,12 +1,7 @@ -#include -#include -#include #include -#include #include "DylibBundler.h" #include "Settings.h" -#include "Utils.h" const std::string VERSION = "2.0.0 (2019-12-29)";