return find(Key, Key + strlen(Key));
}
iterator find(const std::string &Key) {
return find(Key, Key + strlen(Key));
}
iterator find(const std::string &Key) {
- const char* key_start = &Key[0];
+ const char* key_start = (Key.empty() ? NULL : &Key[0]);
return find(key_start, key_start + Key.size());
}
return find(key_start, key_start + Key.size());
}
return find(Key, Key + strlen(Key));
}
const_iterator find(const std::string &Key) const {
return find(Key, Key + strlen(Key));
}
const_iterator find(const std::string &Key) const {
- const char* key_start = &Key[0];
+ const char* key_start = (Key.empty() ? NULL : &Key[0]);
return find(key_start, key_start + Key.size());
}
return find(key_start, key_start + Key.size());
}
return entry.getValue();
}
ValueTy& operator[](const std::string &Key) {
return entry.getValue();
}
ValueTy& operator[](const std::string &Key) {
- const char* key_start = &Key[0];
+ const char* key_start = (Key.empty() ? NULL : &Key[0]);
value_type& entry = GetOrCreateValue(key_start, key_start + Key.size());
return entry.getValue();
}
value_type& entry = GetOrCreateValue(key_start, key_start + Key.size());
return entry.getValue();
}
return count(Key, Key + strlen(Key));
}
size_type count(const std::string &Key) const {
return count(Key, Key + strlen(Key));
}
size_type count(const std::string &Key) const {
- const char* key_start = &Key[0];
+ const char* key_start = (Key.empty() ? NULL : &Key[0]);
return count(key_start, key_start + Key.size());
}
return count(key_start, key_start + Key.size());
}