Simplify Dictionary and reduce memory usage, now no more std::maps in core.

This commit is contained in:
Adam Ierymenko 2015-10-01 18:12:16 -07:00
parent 76a95dc58f
commit 5384f185ae
4 changed files with 99 additions and 73 deletions

View file

@ -140,7 +140,7 @@ void Topology::setRootServers(const Dictionary &sn)
if ((d->first.length() == ZT_ADDRESS_LENGTH_HEX)&&(d->second.length() > 0)) {
try {
Dictionary snspec(d->second);
std::vector<InetAddress> &a = m[Identity(snspec.get("id"))];
std::vector<InetAddress> &a = m[Identity(snspec.get("id",""))];
std::string udp(snspec.get("udp",std::string()));
if (udp.length() > 0)
a.push_back(InetAddress(udp));