diff options
author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2017-04-18 11:00:29 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2017-04-18 11:00:29 -0700 |
commit | 72bd3064a20aec9b1fcbc86bb590aca87f4eca71 (patch) | |
tree | cad5b4aa1d572790d8903f74c90b34d2a782752c /node | |
parent | a1c316b9400c7f64e7359708560a0429883aad28 (diff) | |
download | infinitytier-72bd3064a20aec9b1fcbc86bb590aca87f4eca71.tar.gz infinitytier-72bd3064a20aec9b1fcbc86bb590aca87f4eca71.zip |
Windows build fixes, self test cleanup.
Diffstat (limited to 'node')
-rw-r--r-- | node/Dictionary.hpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/node/Dictionary.hpp b/node/Dictionary.hpp index fa9e2883..440dae7f 100644 --- a/node/Dictionary.hpp +++ b/node/Dictionary.hpp @@ -417,46 +417,6 @@ public: } /** - * Erase a key from this dictionary - * - * Use this before add() to ensure that a key is replaced if it might - * already be present. - * - * @param key Key to erase - * @return True if key was found and erased - */ - inline bool erase(const char *key) - { - char d2[C]; - char *saveptr = (char *)0; - unsigned int d2ptr = 0; - bool found = false; - for(char *f=Utils::stok(_d,"\r\n",&saveptr);(f);f=Utils::stok((char *)0,"\r\n",&saveptr)) { - if (*f) { - const char *p = f; - const char *k = key; - while ((*k)&&(*p)) { - if (*k != *p) - break; - ++k; - ++p; - } - if (*k) { - p = f; - while (*p) - d2[d2ptr++] = *(p++); - d2[d2ptr++] = '\n'; - } else { - found = true; - } - } - } - d2[d2ptr++] = (char)0; - memcpy(_d,d2,d2ptr); - return found; - } - - /** * @return Value of C template parameter */ inline unsigned int capacity() const { return C; } |