From: Jordan DeLong Date: Sun, 20 Jan 2013 20:18:07 +0000 (-0800) Subject: Remove a bit of debug code in folly::Range X-Git-Tag: v0.22.0~1077 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d50ff184408886023433ace2f9d735277e350773;p=folly.git Remove a bit of debug code in folly::Range Summary: Seems like we can drop this, as the case that motivated adding it wouldn't have been caught by it. Test Plan: Compiled folly/test. Reviewed By: tudorb@fb.com FB internal diff: D684200 --- diff --git a/folly/Range.h b/folly/Range.h index d69d335e..a65cab62 100644 --- a/folly/Range.h +++ b/folly/Range.h @@ -127,26 +127,9 @@ public: Range() : b_(), e_() { } -private: - static bool reachable(Iter b, Iter e, std::forward_iterator_tag) { - for (; b != e; ++b) { - LOG_EVERY_N(INFO, 100000) << __FILE__ ":" << __LINE__ - << " running reachability test (" - << google::COUNTER << " iterations)..."; - } - return true; - } - - static bool reachable(Iter b, Iter e, std::random_access_iterator_tag) { - return b <= e; - } - public: // Works for all iterators - Range(Iter start, Iter end) - : b_(start), e_(end) { - assert(reachable(b_, e_, - typename std::iterator_traits::iterator_category())); + Range(Iter start, Iter end) : b_(start), e_(end) { } // Works only for random-access iterators