mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
* drop mapMultiArgs : it's not used anywhere
This commit is contained in:
parent
05043f30dc
commit
1d5194a138
@ -65,7 +65,7 @@ namespace i2p
|
|||||||
|
|
||||||
LogPrint(eLogInfo, "i2pd v", VERSION, " starting");
|
LogPrint(eLogInfo, "i2pd v", VERSION, " starting");
|
||||||
LogPrint(eLogDebug, "FS: data directory: ", i2p::util::filesystem::GetDataDir().string());
|
LogPrint(eLogDebug, "FS: data directory: ", i2p::util::filesystem::GetDataDir().string());
|
||||||
i2p::util::filesystem::ReadConfigFile(i2p::util::config::mapArgs, i2p::util::config::mapMultiArgs);
|
i2p::util::filesystem::ReadConfigFile(i2p::util::config::mapArgs);
|
||||||
|
|
||||||
isDaemon = i2p::util::config::GetArg("-daemon", 0);
|
isDaemon = i2p::util::config::GetArg("-daemon", 0);
|
||||||
isLogging = i2p::util::config::GetArg("-log", 1);
|
isLogging = i2p::util::config::GetArg("-log", 1);
|
||||||
|
7
util.cpp
7
util.cpp
@ -70,12 +70,10 @@ namespace util
|
|||||||
namespace config
|
namespace config
|
||||||
{
|
{
|
||||||
std::map<std::string, std::string> mapArgs;
|
std::map<std::string, std::string> mapArgs;
|
||||||
std::map<std::string, std::vector<std::string> > mapMultiArgs;
|
|
||||||
|
|
||||||
void OptionParser(int argc, const char* const argv[])
|
void OptionParser(int argc, const char* const argv[])
|
||||||
{
|
{
|
||||||
mapArgs.clear();
|
mapArgs.clear();
|
||||||
mapMultiArgs.clear();
|
|
||||||
for (int i = 1; i < argc; i++)
|
for (int i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
std::string strKey (argv[i]);
|
std::string strKey (argv[i]);
|
||||||
@ -96,7 +94,6 @@ namespace config
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
mapArgs[strKey] = strValue;
|
mapArgs[strKey] = strValue;
|
||||||
mapMultiArgs[strKey].push_back(strValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_FOREACH(PAIRTYPE(const std::string,std::string)& entry, mapArgs)
|
BOOST_FOREACH(PAIRTYPE(const std::string,std::string)& entry, mapArgs)
|
||||||
@ -196,8 +193,7 @@ namespace filesystem
|
|||||||
return pathTunnelsConfigFile;
|
return pathTunnelsConfigFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet,
|
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet)
|
||||||
std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet)
|
|
||||||
{
|
{
|
||||||
boost::filesystem::ifstream streamConfig(GetConfigFile());
|
boost::filesystem::ifstream streamConfig(GetConfigFile());
|
||||||
if (!streamConfig.good())
|
if (!streamConfig.good())
|
||||||
@ -214,7 +210,6 @@ namespace filesystem
|
|||||||
{
|
{
|
||||||
mapSettingsRet[strKey] = it->value[0];
|
mapSettingsRet[strKey] = it->value[0];
|
||||||
}
|
}
|
||||||
mapMultiSettingsRet[strKey].push_back(it->value[0]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
util.h
4
util.h
@ -17,7 +17,6 @@ namespace util
|
|||||||
namespace config
|
namespace config
|
||||||
{
|
{
|
||||||
extern std::map<std::string, std::string> mapArgs;
|
extern std::map<std::string, std::string> mapArgs;
|
||||||
extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
|
|
||||||
void OptionParser(int argc, const char* const argv[]);
|
void OptionParser(int argc, const char* const argv[]);
|
||||||
int GetArg(const std::string& strArg, int nDefault);
|
int GetArg(const std::string& strArg, int nDefault);
|
||||||
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
||||||
@ -34,8 +33,7 @@ namespace util
|
|||||||
boost::filesystem::path GetDefaultDataDir();
|
boost::filesystem::path GetDefaultDataDir();
|
||||||
boost::filesystem::path GetConfigFile();
|
boost::filesystem::path GetConfigFile();
|
||||||
boost::filesystem::path GetTunnelsConfigFile();
|
boost::filesystem::path GetTunnelsConfigFile();
|
||||||
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet,
|
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet);
|
||||||
std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
|
|
||||||
boost::filesystem::path GetCertificatesDir();
|
boost::filesystem::path GetCertificatesDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user