Commit 0c8631dc authored by Tudor Bosman's avatar Tudor Bosman Committed by Sara Golemon

Add non-const operator[] to TypedIOBuf

Test Plan: used it

Reviewed By: lucian@fb.com

FB internal diff: D1277063

@override-unit-failures
parent e39dfd9d
......@@ -153,6 +153,11 @@ class TypedIOBuf {
return data()[idx];
}
T& operator[](ssize_t idx) {
assert(idx >= 0 && idx < length());
return writableData()[idx];
}
/**
* Append one element.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment