Wes McKinney created ARROW-12530: ------------------------------------ Summary: [C++] Remove Buffer::mutable_data_ member and use const_cast on data_ only if is_mutable_ is true Key: ARROW-12530 URL: https://issues.apache.org/jira/browse/ARROW-12530 Project: Apache Arrow Issue Type: Improvement Components: C++ Reporter: Wes McKinney Fix For: 5.0.0
Proposed new implementation of mutable_data() by [~apitrou] {code} uint8_t* mutable_data() { return is_mutable() ? const_cast<uint8_t*>(data()) : nullptr; } {code} This will help avoid various classes of bugs (initializing Buffer subclasses incorrectly) and make the object smaller on the heap -- This message was sent by Atlassian Jira (v8.3.4#803005)