[Spice-devel] [spice-gtk PATCHv2] usb: Add info message when USB dialog is empty

Hans de Goede hdegoede at redhat.com
Sat Sep 29 02:50:25 PDT 2012


Hi,

On 09/28/2012 08:48 PM, Christophe Fergeau wrote:
> On Fri, Sep 28, 2012 at 08:08:19PM +0200, Hans de Goede wrote:
>> Sorry to be a PITA, but I'm not really happy with making it a local variable, that
>> makes the code more complicated (IMHO), for saving just 4 bytes of ram. Likely the
>> extra code-size of the new code will amply compensate that ...
>
> Oh, my goal was not to save memory. What I don't like with putting the
> count in the global state is that the count will be invalid most of the
> time, which can be confusing when hacking on the code. When I have an
> object instance, I expect its members to be meaningful during the object
> lifecycle, not just in some specific places I need to know about.

Ah, I see, but since we need to call spice_usb_device_widget_update_status
whenever a device is added / removed, the count should always be accurate :)

Regards,

Hans


More information about the Spice-devel mailing list