예제 #1
0
	void update(const string& key,double val) {
		int idx = -1;
		bool found = da.exactMatchExists(key.c_str(),key.size(),&idx);
		if(found) {
			data[idx] = val;
			return;
		}
		insert(key,val);
	}
예제 #2
0
	bool exists(const string& key,double &old) {
		int idx = -1;
		bool found = da.exactMatchExists(key.c_str(),key.size(),&idx);
		if(found) old = data[idx];
		return found;
	}