[Webkit-unassigned] [Bug 70897] Use a simple page client/controller for user consent in getUserMedia()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 10 05:24:39 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=70897





--- Comment #21 from Tommy Widenflycht <tommyw at google.com>  2011-11-10 05:24:38 PST ---

> > >> Source/WebCore/mediastream/UserMediaRequest.cpp:78
> > >> +    for (size_t i = 0; i < optionsList.size(); i++) {
> > > 
> > > ++i
> > 
> > FYI: This means that you should change your i++ to ++i. A prefix operator is generally much better than a postfix one.
> 
> I got that, but I was just wondering what the motivation was (it's a pure style issue in this particular case). I haven't got this comment before and there's nothing about it in the style guidelines (perhaps it should be added?). It's anyhow fixed now.

For an int etc it doesn't matter but if you have an object (like an iterator) the compiler has to clone the object if you use a postfix operator. Best all around to avoid postfix unless you really need it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list