WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 130402
Removing MediaStreamVector typedef
https://bugs.webkit.org/show_bug.cgi?id=130402
Summary
Removing MediaStreamVector typedef
Thiago de Barros Lacerda
Reported
2014-03-18 09:58:48 PDT
As did in
r158480
for MediaStreamTrackVector and MediaStreamSourceVector. Those typedefs just compromises the code readability.
Attachments
Patch
(4.34 KB, patch)
2014-03-18 10:06 PDT
,
Thiago de Barros Lacerda
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Thiago de Barros Lacerda
Comment 1
2014-03-18 10:06:30 PDT
Created
attachment 227063
[details]
Patch
WebKit Commit Bot
Comment 2
2014-03-18 12:48:24 PDT
Comment on
attachment 227063
[details]
Patch Clearing flags on attachment: 227063 Committed
r165834
: <
http://trac.webkit.org/changeset/165834
>
WebKit Commit Bot
Comment 3
2014-03-18 12:48:28 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 4
2014-03-19 18:42:34 PDT
Comment on
attachment 227063
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=227063&action=review
> Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:520 > - for (MediaStreamVector::iterator iter = m_localStreams.begin(); iter != m_localStreams.end(); ++iter) { > + for (auto iter = m_localStreams.begin(); iter != m_localStreams.end(); ++iter) { > if ((*iter)->id() == streamId) > return iter->get(); > }
When you touch a loop like this one it’s best to make it a modern C++ loop too: for (auto& stream : m_localStreams) { if (stream->id() == streamId) return stream->get(); } Isn’t that better?
Thiago de Barros Lacerda
Comment 5
2014-03-20 06:42:34 PDT
(In reply to
comment #4
)
> (From update of
attachment 227063
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=227063&action=review
> > > Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:520 > > - for (MediaStreamVector::iterator iter = m_localStreams.begin(); iter != m_localStreams.end(); ++iter) { > > + for (auto iter = m_localStreams.begin(); iter != m_localStreams.end(); ++iter) { > > if ((*iter)->id() == streamId) > > return iter->get(); > > } > > When you touch a loop like this one it’s best to make it a modern C++ loop too: > > for (auto& stream : m_localStreams) { > if (stream->id() == streamId) > return stream->get(); > } > > Isn’t that better?
Indeed Darin, I will do that next time. Thanks
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug