PICloudServer don't delete clients

This commit is contained in:
Бычков Андрей
2022-11-10 19:01:28 +03:00
parent d46f1a137a
commit 39d81dd23b
6 changed files with 27 additions and 11 deletions

View File

@@ -315,10 +315,10 @@ public:
//! \~english Remove element with key `key` from the array and return it.
//! \~russian Удаляет элемент с ключом `key` из массива и возвращает его.
inline T take(const Key & key) const {
inline T take(const Key & key, const T & default_ = T()) {
bool f(false);
ssize_t i = _find(key, f);
if (!f) return T();
if (!f) return default_;
T ret(pim_content[pim_index[i].index]);
_remove(i);
return ret;