Skip to content

Commit 72ceb63

Browse files
generatedunixname89002005287564meta-codesync[bot]
authored andcommitted
Fix CQS signal modernize-pass-by-value in fbcode/proxygen/httpclient
Reviewed By: hanidamlaj Differential Revision: D89646895 fbshipit-source-id: f80e457686b4667066ed2297f12e8e356ea36965
1 parent 28a9e15 commit 72ceb63

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

third-party/proxygen/src/proxygen/httpclient/samples/curl/CurlClient.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <iostream>
1212
#include <sys/stat.h>
13+
#include <utility>
1314

1415
#include <folly/FileUtil.h>
1516
#include <folly/String.h>
@@ -30,17 +31,17 @@ namespace CurlService {
3031

3132
CurlClient::CurlClient(EventBase* evb,
3233
HTTPMethod httpMethod,
33-
const URL& url,
34+
URL url,
3435
const proxygen::URL* proxy,
3536
const HTTPHeaders& headers,
36-
const string& inputFilename,
37+
string inputFilename,
3738
bool h2c,
3839
unsigned short httpMajor,
3940
unsigned short httpMinor)
4041
: evb_(evb),
4142
httpMethod_(httpMethod),
42-
url_(url),
43-
inputFilename_(inputFilename),
43+
url_(std::move(url)),
44+
inputFilename_(std::move(inputFilename)),
4445
h2c_(h2c),
4546
httpMajor_(httpMajor),
4647
httpMinor_(httpMinor) {

third-party/proxygen/src/proxygen/httpclient/samples/curl/CurlClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ class CurlClient
6868
public:
6969
CurlClient(folly::EventBase* evb,
7070
proxygen::HTTPMethod httpMethod,
71-
const proxygen::URL& url,
71+
proxygen::URL url,
7272
const proxygen::URL* proxy,
7373
const proxygen::HTTPHeaders& headers,
74-
const std::string& inputFilename,
74+
std::string inputFilename,
7575
bool h2c = false,
7676
unsigned short httpMajor = 1,
7777
unsigned short httpMinor = 1);

third-party/proxygen/src/proxygen/httpclient/samples/websocket/WebSocketClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ using namespace std;
1818

1919
namespace websocketclient {
2020

21-
WebSocketClient::WebSocketClient(EventBase* evb, const proxygen::URL& url)
22-
: evb_(evb), url_(url) {
21+
WebSocketClient::WebSocketClient(EventBase* evb, proxygen::URL url)
22+
: evb_(evb), url_(std::move(url)) {
2323
}
2424

2525
void WebSocketClient::connectSuccess(HTTPUpstreamSession* session) {

third-party/proxygen/src/proxygen/httpclient/samples/websocket/WebSocketClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class WebSocketClient
2020
, public proxygen::HTTPTransactionHandler {
2121

2222
public:
23-
WebSocketClient(folly::EventBase* evb, const proxygen::URL& url);
23+
WebSocketClient(folly::EventBase* evb, proxygen::URL url);
2424

2525
~WebSocketClient() override = default;
2626

0 commit comments

Comments
 (0)