rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifplu...@apache.org
Subject [rocketmq-client-cpp] 08/29: fix: use invalid ByteArrayRef after call std::move
Date Tue, 29 Dec 2020 03:36:25 GMT
This is an automated email from the ASF dual-hosted git repository.

ifplusor pushed a commit to branch re_dev
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git

commit dc782f256e498ec7a99dc24cdde5016b7704adf4
Author: James Yin <ywhjames@hotmail.com>
AuthorDate: Wed Jul 29 22:23:17 2020 +0800

    fix: use invalid ByteArrayRef after call std::move
---
 src/io/DefaultByteBuffer.hpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/io/DefaultByteBuffer.hpp b/src/io/DefaultByteBuffer.hpp
index 73a4039..ca740ba 100644
--- a/src/io/DefaultByteBuffer.hpp
+++ b/src/io/DefaultByteBuffer.hpp
@@ -32,8 +32,7 @@ class DefaultByteBuffer : public ByteBuffer {
 
   DefaultByteBuffer(int32_t cap, int32_t lim) : ByteBuffer(-1, 0, lim, cap, std::make_shared<ByteArray>(cap),
0) {}
 
-  DefaultByteBuffer(ByteArrayRef buf, int32_t off, int32_t len)
-      : ByteBuffer(-1, off, off + len, buf->size(), std::move(buf), 0) {}
+  DefaultByteBuffer(ByteArrayRef buf, int32_t off, int32_t len) : ByteBuffer(-1, off, off
+ len, buf->size(), buf, 0) {}
 
   DefaultByteBuffer(ByteArrayRef buf, int32_t mark, int32_t pos, int32_t lim, int32_t cap,
int32_t off)
       : ByteBuffer(mark, pos, lim, cap, std::move(buf), off) {}


Mime
View raw message