diff --git a/accountManager.h b/accountManager.h index d3201b1..0720eba 100644 --- a/accountManager.h +++ b/accountManager.h @@ -3,7 +3,6 @@ #include #include -#include #include struct Account { diff --git a/pageManager.cpp b/pageManager.cpp index 5dd4175..98286d5 100644 --- a/pageManager.cpp +++ b/pageManager.cpp @@ -234,8 +234,8 @@ std::string PageManager::replace(std::string str, std::string substr1, std::stri if(substr1 == "") return str; size_t index = 0; - for (index = str.find(substr1, index); index != std::string::npos; index = str.find(substr1, index + strlen(substr1.c_str())) ) - str.replace(index, strlen(substr1.c_str()), substr2); + for (index = str.find(substr1, index); index != std::string::npos; index = str.find(substr1, index + substr1.length()) ) + str.replace(index, substr1.length(), substr2); return str; } @@ -327,7 +327,7 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho std::cout << " => Error: Konnte 'href=\"' in chooseHosterLink() nicht finden." << std::endl; continue; } - Line.erase(0, pos + static_cast(strlen("href=\""))); + Line.erase(0, pos + 6/*static_cast(strlen("href=\""))*/); pos = Line.find("\""); if(pos == std::string::npos) { @@ -341,7 +341,3 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho } return ""; } - - - - diff --git a/pageManager.h b/pageManager.h index b1dad3f..30d15d2 100644 --- a/pageManager.h +++ b/pageManager.h @@ -4,9 +4,8 @@ #include "accountManager.h" #include "curl/curl.h" -#include #include -#include +#include // sleep #include diff --git a/parameterManager.h b/parameterManager.h index 20336ad..8e07a1f 100644 --- a/parameterManager.h +++ b/parameterManager.h @@ -3,13 +3,14 @@ #include #include -#include +#include // strlen #include #include #include +#include + #include // PATH_MAX #include // readlink() -#include #ifdef _WIN32 #include