Skip to content

Commit

Permalink
Fix autovector iterator increment/decrement comments
Browse files Browse the repository at this point in the history
Summary: The prefix and postfix operators were mixed up in the autovector class.

Test Plan: Inspection

Reviewers: sdong, kailiu

Reviewed By: kailiu

Differential Revision: https://reviews.facebook.net/D21873
  • Loading branch information
Jonah Cohen committed Aug 14, 2014
1 parent 58b0f9d commit f611935
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util/autovector.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,26 @@ class autovector {
iterator_impl& operator=(const iterator_impl&) = default;

// -- Advancement
// iterator++
// ++iterator
self_type& operator++() {
++index_;
return *this;
}

// ++iterator
// iterator++
self_type operator++(int) {
auto old = *this;
++index_;
return old;
}

// iterator--
// --iterator
self_type& operator--() {
--index_;
return *this;
}

// --iterator
// iterator--
self_type operator--(int) {
auto old = *this;
--index_;
Expand Down

0 comments on commit f611935

Please sign in to comment.