This is an automated email from the ASF dual-hosted git repository. kszucs pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git
commit eb84060424da2a246f9ae7a49439ea07c2334921 Author: Pasha Stetsenko <pa...@h2o.ai> AuthorDate: Mon Sep 30 16:28:19 2019 -0500 ARROW-6729: [C++] Prevent data copying in StlStringBuffer Closes #5517 from st-pasha/stl-buffer-nocopy and squashes the following commits: 6f26b4dea <Pasha Stetsenko> try to satisfy lint 2d4dda6c4 <Pasha Stetsenko> remove whitespace 85e91f5e4 <Pasha Stetsenko> Prevent data copying in StlStringBuffer Authored-by: Pasha Stetsenko <pa...@h2o.ai> Signed-off-by: Wes McKinney <wesm+...@apache.org> --- cpp/src/arrow/buffer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/arrow/buffer.cc b/cpp/src/arrow/buffer.cc index bfbf2f8..ca78922 100644 --- a/cpp/src/arrow/buffer.cc +++ b/cpp/src/arrow/buffer.cc @@ -79,7 +79,8 @@ Status Buffer::FromString(const std::string& data, std::shared_ptr<Buffer>* out) class StlStringBuffer : public Buffer { public: - explicit StlStringBuffer(std::string&& data) : Buffer(nullptr, 0), input_(data) { + explicit StlStringBuffer(std::string&& data) + : Buffer(nullptr, 0), input_(std::move(data)) { data_ = reinterpret_cast<const uint8_t*>(input_.c_str()); size_ = static_cast<int64_t>(input_.size()); capacity_ = size_;