From 2a99baafdcac46931b00a9ef9e77340dbc319b58 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 14 Oct 2019 13:36:58 -0400 Subject: remove unnecessary std::move() --- src/conn.cpp | 2 +- src/util.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conn.cpp b/src/conn.cpp index 15f90bc..dab10dc 100644 --- a/src/conn.cpp +++ b/src/conn.cpp @@ -47,7 +47,7 @@ ConnPool::Conn::operator std::string() const { case Conn::PASSIVE: s << "passive"; break; } s << ">"; - return std::move(s); + return std::string(std::move(s)); } /* the following functions are executed by exactly one worker per Conn object */ diff --git a/src/util.cpp b/src/util.cpp index 19b6915..ce98b22 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -126,7 +126,7 @@ std::string vstringprintf(const char *fmt, va_list _ap) { } } va_end(ap); - return std::move(buff); + return buff; } std::string stringprintf(const char *fmt, ...) { @@ -134,7 +134,7 @@ std::string stringprintf(const char *fmt, ...) { va_start(ap, fmt); auto ret = vstringprintf(fmt, ap); va_end(ap); - return std::move(ret); + return ret; } const std::string get_current_datetime() { -- cgit v1.2.3-70-g09d2