acelyc111 commented on code in PR #2088:
URL: 
https://github.com/apache/incubator-pegasus/pull/2088#discussion_r1714062383


##########
src/utils/blob.h:
##########
@@ -119,11 +162,12 @@ class blob
 
     const char *buffer_ptr() const { return _holder.get(); }
 
-    // offset can be negative for buffer dereference
+    // `offset` can be negative for buffer dereference.
     blob range(int offset) const
     {
-        // offset cannot exceed the current length value
-        assert(offset <= static_cast<int>(_length));
+        CHECK_LE_MSG(offset,

Review Comment:
   These functions maybe on hot paths, do you think it make sense to use 
DCHECK* macros?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to