From c0cb9812a705e799cb4985d6435d7ab60ff67a61 Mon Sep 17 00:00:00 2001 From: Jason Prado Date: Thu, 20 Aug 2015 18:06:23 -0700 Subject: [PATCH] Remove superfluous std::move calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Summary: clang-3.7 upstream warns that these calls prevent a copy elision (-Wpessimizing-move). Reviewed By: @​mzlee Differential Revision: D2366951 --- folly/IPAddress.h | 4 ++-- folly/IPAddressV4.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/IPAddress.h b/folly/IPAddress.h index 797ab57c..cf83e2db 100644 --- a/folly/IPAddress.h +++ b/folly/IPAddress.h @@ -363,8 +363,8 @@ class IPAddress : boost::totally_ordered { * @return IPAddress instance with bits set to 0 */ IPAddress mask(uint8_t numBits) const { - return isV4() ? IPAddress(std::move(asV4().mask(numBits))) - : IPAddress(std::move(asV6().mask(numBits))); + return isV4() ? IPAddress(asV4().mask(numBits)) + : IPAddress(asV6().mask(numBits)); } /** diff --git a/folly/IPAddressV4.h b/folly/IPAddressV4.h index 73556482..8b750fff 100644 --- a/folly/IPAddressV4.h +++ b/folly/IPAddressV4.h @@ -180,7 +180,7 @@ class IPAddressV4 : boost::totally_ordered { ByteArray4 toByteArray() const { ByteArray4 ba{{0}}; std::memcpy(ba.data(), bytes(), 4); - return std::move(ba); + return ba; } // @see IPAddress#toFullyQualified -- 2.34.1