@@ -41,8 +41,7 @@ Result<std::shared_ptr<Buffer>> Buffer::CopySlice(const int64_t start,
4141
4242 ARROW_ASSIGN_OR_RAISE (auto new_buffer, AllocateResizableBuffer (nbytes, pool));
4343 std::memcpy (new_buffer->mutable_data (), data () + start, static_cast <size_t >(nbytes));
44- // R build with openSUSE155 requires an explicit shared_ptr construction
45- return std::shared_ptr<Buffer>(std::move (new_buffer));
44+ return new_buffer;
4645}
4746
4847Buffer::Buffer () : Buffer(memory_pool::internal::kZeroSizeArea , 0 ) {}
@@ -186,8 +185,7 @@ Result<std::shared_ptr<Buffer>> AllocateBitmap(int64_t length, MemoryPool* pool)
186185 if (buf->size () > 0 ) {
187186 buf->mutable_data ()[buf->size () - 1 ] = 0 ;
188187 }
189- // R build with openSUSE155 requires an explicit shared_ptr construction
190- return std::shared_ptr<Buffer>(std::move (buf));
188+ return buf;
191189}
192190
193191Result<std::shared_ptr<Buffer>> AllocateEmptyBitmap (int64_t length, MemoryPool* pool) {
@@ -199,8 +197,7 @@ Result<std::shared_ptr<Buffer>> AllocateEmptyBitmap(int64_t length, int64_t alig
199197 ARROW_ASSIGN_OR_RAISE (auto buf,
200198 AllocateBuffer (bit_util::BytesForBits (length), alignment, pool));
201199 memset (buf->mutable_data (), 0 , static_cast <size_t >(buf->size ()));
202- // R build with openSUSE155 requires an explicit shared_ptr construction
203- return std::shared_ptr<Buffer>(std::move (buf));
200+ return buf;
204201}
205202
206203Result<std::shared_ptr<Buffer>> ConcatenateBuffers (
@@ -218,8 +215,7 @@ Result<std::shared_ptr<Buffer>> ConcatenateBuffers(
218215 out_data += buffer->size ();
219216 }
220217 }
221- // R build with openSUSE155 requires an explicit shared_ptr construction
222- return std::shared_ptr<Buffer>(std::move (out));
218+ return out;
223219}
224220
225221} // namespace arrow
0 commit comments