mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-08 23:26:52 +02:00
Remove GetCharArg(). Organize CLI options file.
GetCharArg() was either a hack to keep from segfaulting when using this botched option parser or it was old forgotten code - or both. GetCharArg() was not needed because from_string() has std::string overloaded and every GetCharArg() made its way to from_string(). Note: when using from_string() with std::string, it must be caught!
This commit is contained in:
parent
1eff72d525
commit
5ae7e35e80
9 changed files with 60 additions and 46 deletions
|
@ -63,6 +63,7 @@ http://stackoverflow.com/questions/15660203/inet-pton-identifier-not-found */
|
|||
namespace i2p {
|
||||
namespace util {
|
||||
|
||||
// TODO: this will be replaced by a real option parser soon.
|
||||
namespace config {
|
||||
std::map<std::string, std::string> mapArgs;
|
||||
std::map<std::string, std::vector<std::string> > mapMultiArgs;
|
||||
|
|
|
@ -38,12 +38,6 @@ namespace util
|
|||
*/
|
||||
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
||||
|
||||
/**
|
||||
* @return a command line argument from config::mapArgs as a C-style string
|
||||
* @param nDefault the default value to be returned
|
||||
*/
|
||||
const char* GetCharArg(const std::string& strArg, const std::string& nDefault);
|
||||
|
||||
/**
|
||||
* @return true if the argument is set, false otherwise
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue