tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Update api_who_reacted.cpp

Open overinvest opened this issue 10 months ago • 4 comments

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.

overinvest avatar Apr 17 '24 20:04 overinvest

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 17 '24 20:04 CLAassistant

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.

mochaaP avatar Apr 18 '24 06:04 mochaaP

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

mancarv avatar May 20 '24 13:05 mancarv