Skip to content

Commit f3f4c7e

Browse files
generatedunixname89002005287564meta-codesync[bot]
authored andcommitted
Fix CQS signal modernize-pass-by-value in fbcode/proxygen/lib [B]
Differential Revision: D91145493 fbshipit-source-id: e4ad20625903b07d1a38c005882e2443cc38ec06
1 parent 24e7f23 commit f3f4c7e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

proxygen/lib/utils/AcceptorAddress.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212

1313
#include <folly/SocketAddress.h>
1414

15+
#include <utility>
16+
1517
namespace proxygen {
1618

1719
struct AcceptorAddress {
1820
enum class AcceptorType { TCP, UDP };
1921

2022
AcceptorAddress() = delete;
2123
AcceptorAddress(folly::SocketAddress address, AcceptorType protocol)
22-
: address(address), protocol(protocol) {
24+
: address(std::move(address)), protocol(protocol) {
2325
}
2426

2527
folly::SocketAddress address;

proxygen/lib/utils/Exception.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
#include <proxygen/lib/utils/Exception.h>
1010

11+
#include <utility>
12+
1113
namespace proxygen {
1214

13-
Exception::Exception(std::string const& msg) : msg_(msg), code_(0) {
15+
Exception::Exception(std::string msg) : msg_(std::move(msg)), code_(0) {
1416
}
1517

1618
Exception::Exception(const char* msg) : msg_(msg), code_(0) {

proxygen/lib/utils/Exception.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace proxygen {
2424
*/
2525
class Exception : public std::exception {
2626
public:
27-
explicit Exception(std::string const& msg);
27+
explicit Exception(std::string msg);
2828
explicit Exception(const char* msg);
2929
Exception(const Exception&);
3030
Exception(Exception& other) : Exception(std::as_const(other)) {

0 commit comments

Comments
 (0)