[pulseaudio-discuss] [PATCH v2 1/2 pavucontrol] mainwindow: Show the availability of the ports and profiles.

Tanu Kaskinen tanuk at iki.fi
Sat Nov 24 07:22:37 PST 2012


On Sat, 2012-11-24 at 16:06 +0100, Damir Jelić wrote:
> On Sat, Nov 24, 2012 at 04:29:05PM +0200, Tanu Kaskinen wrote:
> > On Fri, 2012-11-16 at 00:12 +0100, poljar (Damir Jelić) wrote:
> > > diff --git a/src/mainwindow.cc b/src/mainwindow.cc
> > > index 1041eab..63e02e8 100644
> > > --- a/src/mainwindow.cc
> > > +++ b/src/mainwindow.cc
> > > @@ -254,12 +254,31 @@ static void set_icon_name_fallback(Gtk::Image *i, const char *name, Gtk::IconSiz
> > >  
> > >  static void updatePorts(DeviceWidget *w, std::map<Glib::ustring, PortInfo> &ports) {
> > >      std::map<Glib::ustring, PortInfo>::iterator it;
> > > +    PortInfo p;
> > > +
> > > +    for (uint32_t i = 0; i < w->ports.size(); i++) {
> > > +        Glib::ustring desc;
> > > +        it = ports.find(w->ports[i].first);
> > > +
> > > +        if (it == ports.end())
> > > +            continue;
> > > +
> > > +        p = (*it).second;
> > 
> > Out of curiosity, is the reason for using (*it).second instead of
> > it->second that you think it looks better, or something else?
> > 
> I think I saw that somewhere else so I tried to be consistent, but I'm
> not completely sure anymore.

Yes, I noticed myself too (after sending that message) that there were
also other places where that style was used. I committed a separate
patch that changes all occurrences of (*it).second to it->seconds.

-- 
Tanu



More information about the pulseaudio-discuss mailing list