26 Nov
2024
26 Nov
'24
9:06 p.m.
On Tue Nov 26 20:42:18 2024 +0000, Jacek Caban wrote:
When that's a problem, you could just have a variables storing host and/or client instances and read them from wine_instance struct just once. Splitting a structure into multiple arguments while still passing its pointer doesn't seem productive to me. Sure, I don't think it makes much difference to hoist variables in the function or in parameters.
IMO it's cleaner to avoid pass partially-initialized objects as in-out parameters, and instead pass the initialized fields (or better, variables) as input and the uninitialized fields or objects as output, until the objects are fully initialized, but I don't really mind. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6427#note_88961