Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.cpp
Show First 20 Lines • Show All 806 Lines • ▼ Show 20 Lines | void ClearDatadirCache() { | ||||
pathCachedNetSpecific = fs::path(); | pathCachedNetSpecific = fs::path(); | ||||
g_blocks_path_cache_net_specific = fs::path(); | g_blocks_path_cache_net_specific = fs::path(); | ||||
} | } | ||||
fs::path GetConfigFile(const std::string &confPath) { | fs::path GetConfigFile(const std::string &confPath) { | ||||
return AbsPathForConfigVal(fs::path(confPath), false); | return AbsPathForConfigVal(fs::path(confPath), false); | ||||
} | } | ||||
static std::string TrimString(const std::string &str, | |||||
const std::string &pattern) { | |||||
std::string::size_type front = str.find_first_not_of(pattern); | |||||
if (front == std::string::npos) { | |||||
return std::string(); | |||||
} | |||||
std::string::size_type end = str.find_last_not_of(pattern); | |||||
return str.substr(front, end - front + 1); | |||||
} | |||||
static bool | static bool | ||||
GetConfigOptions(std::istream &stream, const std::string &filepath, | GetConfigOptions(std::istream &stream, const std::string &filepath, | ||||
std::string &error, | std::string &error, | ||||
std::vector<std::pair<std::string, std::string>> &options, | std::vector<std::pair<std::string, std::string>> &options, | ||||
std::list<SectionInfo> §ions) { | std::list<SectionInfo> §ions) { | ||||
std::string str, prefix; | std::string str, prefix; | ||||
std::string::size_type pos; | std::string::size_type pos; | ||||
int linenr = 1; | int linenr = 1; | ||||
▲ Show 20 Lines • Show All 567 Lines • Show Last 20 Lines |