Re: [PATCH v2 0/6] sound cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 25, 2017 at 09:39:26AM +0200, Pavel Grunt wrote:
> Hi Jonathon,
> 
> I don't see a benefit of removing ("inlining") on_new_{playback,
> record}_channel_client. I actually prefer shorter functions even if it
> means that some other function is called only once. It is also
> recommended in the style document:
> https://www.spice-space.org/spice-project-coding-style-and-coding-conv
> entions.html#_short_functions
> 
> In case you do it to make more obvious that the client is not active
> then imho is better to assert it.

In this case, the splitting of some of the constructor code in a
separate on_new_XXX() make little logical sense. Why is this specific
code in a separate function? The code which ended there seems very
random to me. I agree that the constructor gets a bit big with
everything in it, but in my opinion it's better than having a very
arbitrary on_new_XXX() method. Maybe the constructor can be meaningfully
split in smaller methods, but then they would probably be named
differently.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]