tdesktop
tdesktop copied to clipboard
Update api_who_reacted.cpp
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 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.
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.