Skip to content

Commit 3ff1c7a

Browse files
committed
remove brackets around single statement ifs
on-behalf-of: @amd <[email protected]>
1 parent 48416d1 commit 3ff1c7a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang-tools-extra/clang-tidy/readability/AvoidDefaultLambdaCaptureCheck.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ using namespace clang::ast_matchers;
1616
namespace clang::tidy::readability {
1717

1818
static std::string generateCaptureText(const LambdaCapture &Capture) {
19-
if (Capture.capturesThis()) {
19+
if (Capture.capturesThis())
2020
return Capture.getCaptureKind() == LCK_StarThis ? "*this" : "this";
21-
}
2221

2322
std::string Result;
24-
if (Capture.getCaptureKind() == LCK_ByRef) {
23+
if (Capture.getCaptureKind() == LCK_ByRef)
2524
Result += "&";
26-
}
25+
2726
Result += Capture.getCapturedVar()->getName().str();
2827
return Result;
2928
}

0 commit comments

Comments
 (0)