felipecrv commented on code in PR #36418:
URL: https://github.com/apache/arrow/pull/36418#discussion_r1248325190
##########
cpp/src/arrow/buffer_builder.h:
##########
@@ -196,6 +202,14 @@ class ARROW_EXPORT BufferBuilder {
int64_t length() const { return size_; }
const uint8_t* data() const { return data_; }
uint8_t* mutable_data() { return data_; }
+ template <typename T>
+ const T* data_as() const {
+ return reinterpret_cast<const T*>(data());
Review Comment:
Nit: just return `data_` so Debug builds don't have to put code to call
`data()` :D
--
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]