Skip to content

Фролов Кирилл фт-304#1

Open
MrPlesk2 wants to merge 1 commit intocppdevcourse:masterfrom
MrPlesk2:master
Open

Фролов Кирилл фт-304#1
MrPlesk2 wants to merge 1 commit intocppdevcourse:masterfrom
MrPlesk2:master

Conversation

@MrPlesk2
Copy link
Copy Markdown

No description provided.

Comment thread auth.hpp
uint64_t AcquireSessionId();
void ReleaseSessionId(uint64_t id);

std::unordered_map<std::string, User> users_;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Так немного нарушается простота воспроиятия данных. У вас есть структура User, но имени в ней нет. Как можно было бы пользоваться ассоциативным контейнером с поиском по имени и хранить все данные пользователя в одной структуре?

Comment thread auth.hpp

bool DelUser(uint64_t sessionId, const std::string& username);

bool SessionExists(uint64_t sessionId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У многих параметров не хватает константности

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants