Replace CHECK_GT with DCHECK_GT in folly::Range::operator[]
authorDhruv Matani <dhruvbird@fb.com>
Wed, 5 Feb 2014 06:15:15 +0000 (22:15 -0800)
committerSara Golemon <sgolemon@fb.com>
Thu, 6 Feb 2014 19:50:14 +0000 (11:50 -0800)
Summary: Since I don't want to pay the cost when we access array elements. If I did, I would just use Java.

Test Plan: fbconfig folly/test/ && fbmake runtests

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1158505

folly/Range.h

index 6aba60be09486ac5adea9760f0a82ebbbf82de33..f692b75a04db51acf9c49f2e60aaac56d0e7266f 100644 (file)
@@ -323,12 +323,12 @@ public:
   }
 
   value_type& operator[](size_t i) {
-    CHECK_GT(size(), i);
+    DCHECK_GT(size(), i);
     return b_[i];
   }
 
   const value_type& operator[](size_t i) const {
-    CHECK_GT(size(), i);
+    DCHECK_GT(size(), i);
     return b_[i];
   }