remove unneeded includes

This commit is contained in:
SCG82 2020-01-03 22:09:45 -08:00
parent bc8c55e6c2
commit c4ff430bd3
9 changed files with 10 additions and 37 deletions

View File

@ -1,23 +1,7 @@
#include "Dependency.h" #include "Dependency.h"
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream> #include <iostream>
#include <locale>
#include <sstream>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
// #include "DylibBundler.h"
#include "Settings.h" #include "Settings.h"
#include "Utils.h" #include "Utils.h"

View File

@ -1,3 +1,5 @@
#pragma once
#ifndef _depend_h_ #ifndef _depend_h_
#define _depend_h_ #define _depend_h_

View File

@ -1,10 +1,7 @@
#include "DylibBundler.h" #include "DylibBundler.h"
#include <cstdio>
#include <cstdlib>
#include <iostream> #include <iostream>
#include <map> #include <map>
#include <numeric>
#include <set> #include <set>
#ifdef __linux #ifdef __linux
#include <linux/limits.h> #include <linux/limits.h>
@ -19,8 +16,6 @@ std::map<std::string, std::vector<Dependency>> deps_per_file;
std::map<std::string, bool> deps_collected; std::map<std::string, bool> deps_collected;
std::set<std::string> frameworks; std::set<std::string> frameworks;
std::set<std::string> rpaths; std::set<std::string> rpaths;
// std::map<std::string, std::vector<std::string>> rpaths_per_file;
// std::map<std::string, std::string> rpath_to_fullpath;
bool qt_plugins_called = false; bool qt_plugins_called = false;
void addDependency(std::string path, std::string dependent_file) 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); parseLoadCommands(filename, std::string("LC_RPATH"), std::string("path"), lines);
for (const auto& line : lines) { for (const auto& line : lines) {
rpaths.insert(line); rpaths.insert(line);
// rpaths_per_file[filename].push_back(line);
Settings::addRpathForFile(filename, line); Settings::addRpathForFile(filename, line);
if (Settings::verboseOutput()) if (Settings::verboseOutput())
std::cout << " rpath: " << line << std::endl; std::cout << " rpath: " << line << std::endl;

View File

@ -1,3 +1,5 @@
#pragma once
#ifndef _DYLIB_BUNDLER_H_ #ifndef _DYLIB_BUNDLER_H_
#define _DYLIB_BUNDLER_H_ #define _DYLIB_BUNDLER_H_

View File

@ -84,7 +84,6 @@ std::string insideLibPath() { return inside_path; }
void insideLibPath(std::string p) void insideLibPath(std::string p)
{ {
inside_path = p; inside_path = p;
// fix path if needed so it ends with '/'
if (inside_path[inside_path.size()-1] != '/') if (inside_path[inside_path.size()-1] != '/')
inside_path += "/"; inside_path += "/";
} }

View File

@ -1,3 +1,5 @@
#pragma once
#ifndef _settings_ #ifndef _settings_
#define _settings_ #define _settings_
@ -73,3 +75,5 @@ bool fileHasRpath(const std::string& file);
} // namespace Settings } // namespace Settings
#endif #endif
std::string stripLSlash(const std::string& in);

View File

@ -1,17 +1,12 @@
#include "Utils.h" #include "Utils.h"
#include <cstdio>
#include <cstdlib>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <regex> #include <regex>
#include <sstream> #include <sstream>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "Dependency.h"
#include "Settings.h" #include "Settings.h"
std::string filePrefix(const std::string& in) std::string filePrefix(const std::string& in)
@ -41,7 +36,6 @@ std::string stripLSlash(const std::string& in)
return in; return in;
} }
// trim from end (in place)
void rtrim_in_place(std::string& s) void rtrim_in_place(std::string& s)
{ {
s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char c) { 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()); }).base(), s.end());
} }
// trim from end (copying)
std::string rtrim(std::string s) std::string rtrim(std::string s)
{ {
rtrim_in_place(s); rtrim_in_place(s);

View File

@ -1,11 +1,11 @@
#pragma once
#ifndef _utils_h_ #ifndef _utils_h_
#define _utils_h_ #define _utils_h_
#include <string> #include <string>
#include <vector> #include <vector>
// class Library;
std::string filePrefix(const std::string& in); std::string filePrefix(const std::string& in);
std::string stripPrefix(const std::string& in); std::string stripPrefix(const std::string& in);

View File

@ -1,12 +1,7 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream> #include <iostream>
#include <vector>
#include "DylibBundler.h" #include "DylibBundler.h"
#include "Settings.h" #include "Settings.h"
#include "Utils.h"
const std::string VERSION = "2.0.0 (2019-12-29)"; const std::string VERSION = "2.0.0 (2019-12-29)";