Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api_who_reacted.cpp #27774

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

overinvest
Copy link

Now I split the original RegenerateParticipants function into two separate functions: UpdateExistingParticipants and AddNewParticipants. The first one updates information about existing participants, while the second one adds new participants. Now RegenerateParticipants calls these two functions sequentially to update the participants list. This improves the code structure, making it more understandable and modular.

I split the original RegenerateParticipants function into two separate functions: UpdateExistingParticipants and AddNewParticipants
@CLAassistant
Copy link

CLAassistant commented Apr 17, 2024

CLA assistant check
All committers have signed the CLA.

This code improves readability and structure by using functional transformations and filtering, as well as explicitly updating userpics
@mochaaP
Copy link
Contributor

mochaaP commented Apr 18, 2024

I couldn't think of a reason it must've done this way. It's unnecessary to generate two independent thunks of machine code that will only be called sequentially, especially when building with LTO.

@mancarv
Copy link

mancarv commented May 20, 2024

I couldn't think of a reason it must've done this way. It's unnecessary to generate two independent thunks of machine code that will only be called sequentially, especially when building with LTO.

He explains it and it is a very valid reason

This improves the code structure, making it more understandable and modular.

It's the single-responsibility principle

const std::vector<PeerWithReaction> &ids) {
auto &owner = item->history()->owner();

struct ResolvedPeer {
Copy link

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

J

Choose a reason for hiding this comment

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

lol

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.

7 participants