Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Issue 7129028: views: STL iterator cleanups in View class. (Closed)

Created:
9 years, 6 months ago by tfarina
Modified:
9 years, 6 months ago
Reviewers:
Peter Kasting, sky
CC:
chromium-reviews, dhollowa
Visibility:
Public.

Description

views: STL iterator cleanups in View class. - Standardize iterator naming to |i|. - Initialize them through constructor not assignment operator. - Declare iterators inside loops, not above them. BUG=72040 TEST=None R=pkasting@chromium.org,sky@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88551

Patch Set 1 : #

Total comments: 5

Patch Set 2 : peter review #

Total comments: 2

Patch Set 3 : notreached #

Total comments: 2

Patch Set 4 : move the std::find into the DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -18 lines) Patch
M views/view.cc View 1 2 3 6 chunks +20 lines, -18 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
tfarina
9 years, 6 months ago (2011-06-08 23:30:57 UTC) #1
Peter Kasting
LGTM, I guess http://codereview.chromium.org/7129028/diff/1002/views/view.cc File views/view.cc (right): http://codereview.chromium.org/7129028/diff/1002/views/view.cc#newcode876 views/view.cc:876: std::vector<Accelerator>::iterator i(std::find(accelerators_->begin(), Nit: Linebreak the way ...
9 years, 6 months ago (2011-06-09 00:43:32 UTC) #2
tfarina
http://codereview.chromium.org/7129028/diff/1002/views/view.cc File views/view.cc (right): http://codereview.chromium.org/7129028/diff/1002/views/view.cc#newcode876 views/view.cc:876: std::vector<Accelerator>::iterator i(std::find(accelerators_->begin(), On 2011/06/09 00:43:33, Peter Kasting wrote: > ...
9 years, 6 months ago (2011-06-09 00:57:00 UTC) #3
Peter Kasting
http://codereview.chromium.org/7129028/diff/3/views/view.cc File views/view.cc (right): http://codereview.chromium.org/7129028/diff/3/views/view.cc#newcode886 views/view.cc:886: if (!accelerators_.get()) This doesn't NOTREACHED() the way the old ...
9 years, 6 months ago (2011-06-09 00:59:38 UTC) #4
tfarina
http://codereview.chromium.org/7129028/diff/3/views/view.cc File views/view.cc (right): http://codereview.chromium.org/7129028/diff/3/views/view.cc#newcode886 views/view.cc:886: if (!accelerators_.get()) On 2011/06/09 00:59:38, Peter Kasting wrote: > ...
9 years, 6 months ago (2011-06-09 01:08:17 UTC) #5
tfarina
On 2011/06/09 00:43:32, Peter Kasting wrote: > LGTM, I guess > sky, can I get ...
9 years, 6 months ago (2011-06-09 17:04:07 UTC) #6
sky
LGTM http://codereview.chromium.org/7129028/diff/5002/views/view.cc File views/view.cc (right): http://codereview.chromium.org/7129028/diff/5002/views/view.cc#newcode878 views/view.cc:878: DCHECK(i == accelerators_->end()) move the std::find into the ...
9 years, 6 months ago (2011-06-09 17:06:34 UTC) #7
tfarina
9 years, 6 months ago (2011-06-09 17:17:06 UTC) #8
http://codereview.chromium.org/7129028/diff/5002/views/view.cc
File views/view.cc (right):

http://codereview.chromium.org/7129028/diff/5002/views/view.cc#newcode878
views/view.cc:878: DCHECK(i == accelerators_->end())
On 2011/06/09 17:06:34, sky wrote:
> move the std::find into the DCHECK, eg:
> DCHECK(std::find(...) == accelerators_->end())

Done.

Powered by Google App Engine
This is Rietveld 408576698