Changeset View
Changeset View
Standalone View
Standalone View
src/test/getarg_tests.cpp
Show All 19 Lines | if (strArg.size()) | ||||
boost::split(vecArg, strArg, boost::is_space(), | boost::split(vecArg, strArg, boost::is_space(), | ||||
boost::token_compress_on); | boost::token_compress_on); | ||||
// Insert dummy executable name: | // Insert dummy executable name: | ||||
vecArg.insert(vecArg.begin(), "testbitcoin"); | vecArg.insert(vecArg.begin(), "testbitcoin"); | ||||
// Convert to char*: | // Convert to char*: | ||||
std::vector<const char *> vecChar; | std::vector<const char *> vecChar; | ||||
for (std::string &s : vecArg) { | for (const std::string &s : vecArg) { | ||||
vecChar.push_back(s.c_str()); | vecChar.push_back(s.c_str()); | ||||
} | } | ||||
std::string error; | std::string error; | ||||
gArgs.ParseParameters(vecChar.size(), vecChar.data(), error); | gArgs.ParseParameters(vecChar.size(), vecChar.data(), error); | ||||
} | } | ||||
static void SetupArgs(const std::vector<std::string> &args) { | static void SetupArgs(const std::vector<std::string> &args) { | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |