From 72bd3064a20aec9b1fcbc86bb590aca87f4eca71 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 18 Apr 2017 11:00:29 -0700 Subject: Windows build fixes, self test cleanup. --- node/Dictionary.hpp | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'node') diff --git a/node/Dictionary.hpp b/node/Dictionary.hpp index fa9e2883..440dae7f 100644 --- a/node/Dictionary.hpp +++ b/node/Dictionary.hpp @@ -416,46 +416,6 @@ public: return (this->get(key,tmp,2) >= 0); } - /** - * 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 */ -- cgit v1.2.3