[vte] chunk: Remove erroneous std::move calls



commit 74810de1329073b0dcda36a2f4c227106891e051
Author: Christian Persch <chpe src gnome org>
Date:   Fri Sep 28 12:17:40 2018 +0200

    chunk: Remove erroneous std::move calls

 src/chunk.cc | 2 +-
 src/vte.cc   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/chunk.cc b/src/chunk.cc
index df0c56f0..5049aa64 100644
--- a/src/chunk.cc
+++ b/src/chunk.cc
@@ -32,7 +32,7 @@ static_assert(offsetof(Chunk, data) == offsetof(Chunk, dataminusone) + 1, "Chunk
 void
 Chunk::recycle() noexcept
 {
-        g_free_chunks.push(std::move(std::unique_ptr<Chunk>(this)));
+        g_free_chunks.push(std::unique_ptr<Chunk>(this));
         /* FIXME: bzero out the chunk for security? */
 }
 
diff --git a/src/vte.cc b/src/vte.cc
index 3580d659..6c9dd1a4 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -3500,7 +3500,7 @@ Terminal::convert_incoming() noexcept
         while (outlen > 0) {
                 outbuf = (char*)unibuf->data;
                 while (outlen > 0) {
-                        m_incoming_queue.push(std::move(vte::base::Chunk::get()));
+                        m_incoming_queue.push(vte::base::Chunk::get());
                         auto chunk = m_incoming_queue.back().get();
                         auto len = std::min(size_t(outlen), chunk->capacity());
                         memcpy(chunk->data, outbuf, len);
@@ -3889,7 +3889,7 @@ Terminal::pty_io_read(GIOChannel *channel,
                         /* No chunk, or chunk at least ¾ full? Get a new chunk */
                        if (!chunk ||
                             chunk->len >= 3 * chunk->capacity() / 4) {
-                                m_incoming_queue.push(std::move(vte::base::Chunk::get()));
+                                m_incoming_queue.push(vte::base::Chunk::get());
 
                                 chunk = m_incoming_queue.back().get();
                        }
@@ -4046,7 +4046,7 @@ Terminal::feed(char const* data,
                         chunk = achunk.get();
         }
         if (chunk == nullptr) {
-                m_incoming_queue.push(std::move(vte::base::Chunk::get()));
+                m_incoming_queue.push(vte::base::Chunk::get());
                 chunk = m_incoming_queue.back().get();
         }
 
@@ -4063,7 +4063,7 @@ Terminal::feed(char const* data,
                 data += len;
 
                 /* Get another chunk for the remaining data */
-                m_incoming_queue.push(std::move(vte::base::Chunk::get()));
+                m_incoming_queue.push(vte::base::Chunk::get());
                 chunk = m_incoming_queue.back().get();
         } while (true);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]