Skip to content

Commit 30f9dda

Browse files
generatedunixname89002005287564facebook-github-bot
generatedunixname89002005287564
authored andcommitted
Fix CQS signal. Id] 1540596 -- readability-redundant-string-init in fbcode/proxygen/lib/http
Reviewed By: dtolnay Differential Revision: D73097505 fbshipit-source-id: 43f1a9cdcf24c7ef3e660bc6737818eba0747944
1 parent f7d2f64 commit 30f9dda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

proxygen/lib/http/HTTPHeaders.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ bool HTTPHeaders::forEachValueOfHeader(HTTPHeaderCode code, LAMBDA func) const {
529529
template <typename T>
530530
std::string HTTPHeaders::combine(const T& header,
531531
const std::string& separator) const {
532-
std::string combined = "";
532+
std::string combined;
533533
forEachValueOfHeader(header, [&](const std::string& value) -> bool {
534534
if (combined.empty()) {
535535
combined.append(value);

proxygen/lib/http/test/RFC2616Test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ TEST(QvalueTest, Basic) {
4242
}
4343

4444
{
45-
string test("");
45+
string test;
4646
// The spec says a blank one is ok but empty headers are disallowed in SPDY?
4747
EXPECT_FALSE(RFC2616::parseQvalues(test, output));
4848
EXPECT_EQ(output.size(), 0);

0 commit comments

Comments
 (0)