Fix missing returns in userdb

This commit is contained in:
Martin Bauer 2021-07-27 14:43:02 +02:00
parent 3764fd8b77
commit 2c1f50ee67
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,7 @@ bool User::load(const String &stringId)
numSessions_ = sessionsInFile; numSessions_ = sessionsInFile;
assert(expectedSize == bytesRead); assert(expectedSize == bytesRead);
return true;
} }
void User::init(const String &stringId, size_t sessionAllocateSize) void User::init(const String &stringId, size_t sessionAllocateSize)
@ -160,6 +161,7 @@ User *UserStorage::addNewUser(const String &stringId)
numUsers_++; numUsers_++;
assert(numUsers_ < MAX_USERS); assert(numUsers_ < MAX_USERS);
users_[userIdx].init(stringId); users_[userIdx].init(stringId);
return &users_[userIdx];
} }
bool UserStorage::deleteUser(const String &stringId) bool UserStorage::deleteUser(const String &stringId)
@ -173,6 +175,7 @@ bool UserStorage::deleteUser(const String &stringId)
assert(numUsers_ > 0); assert(numUsers_ > 0);
if (userIdx != numUsers_ - 1) if (userIdx != numUsers_ - 1)
users_[userIdx] = users_[numUsers_ - 1]; users_[userIdx] = users_[numUsers_ - 1];
return true;
} }
void UserStorage::fillFromFileSystem() void UserStorage::fillFromFileSystem()