mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 17:15:09 -07:00
style: Add braces to all control flow statements (#6887)
* style: Add braces to all control flow statements Standardize code style by adding explicit braces to all single-statement control flow blocks (if, else, for, while) across the entire codebase. Also documents the InsertBraces clang-format option (requires v15+) for future automated enforcement. * InsertBraces-check-enabled
This commit is contained in:
parent
7153f7d4c1
commit
aadee34238
173 changed files with 2725 additions and 1461 deletions
|
|
@ -93,10 +93,11 @@ void TabArchidekt::initializeUi()
|
|||
colorLayout->addWidget(manaSymbol);
|
||||
|
||||
connect(manaSymbol, &ManaSymbolWidget::colorToggled, this, [this](QChar c, bool active) {
|
||||
if (active)
|
||||
if (active) {
|
||||
activeColors.insert(c);
|
||||
else
|
||||
} else {
|
||||
activeColors.remove(c);
|
||||
}
|
||||
doSearch();
|
||||
});
|
||||
}
|
||||
|
|
@ -298,16 +299,18 @@ void TabArchidekt::setupFilterWidgets()
|
|||
searchModel->updateSearchResults(text);
|
||||
QString pattern = ".*" + QRegularExpression::escape(text) + ".*";
|
||||
proxyModel->setFilterRegularExpression(QRegularExpression(pattern, QRegularExpression::CaseInsensitiveOption));
|
||||
if (!text.isEmpty())
|
||||
if (!text.isEmpty()) {
|
||||
completer->complete();
|
||||
}
|
||||
});
|
||||
|
||||
connect(commandersField, &QLineEdit::textChanged, this, [=](const QString &text) {
|
||||
searchModel->updateSearchResults(text);
|
||||
QString pattern = ".*" + QRegularExpression::escape(text) + ".*";
|
||||
proxyModel->setFilterRegularExpression(QRegularExpression(pattern, QRegularExpression::CaseInsensitiveOption));
|
||||
if (!text.isEmpty())
|
||||
if (!text.isEmpty()) {
|
||||
completer->complete();
|
||||
}
|
||||
});
|
||||
|
||||
// Assemble secondary toolbar
|
||||
|
|
@ -492,12 +495,13 @@ QString TabArchidekt::buildSearchUrl()
|
|||
|
||||
QString logic = "GTE";
|
||||
QString selected = minDeckSizeLogicCombo->currentText();
|
||||
if (selected == "≥")
|
||||
if (selected == "≥") {
|
||||
logic = "GTE";
|
||||
else if (selected == "≤")
|
||||
} else if (selected == "≤") {
|
||||
logic = "LTE";
|
||||
else
|
||||
} else {
|
||||
logic = "";
|
||||
}
|
||||
|
||||
if (!logic.isEmpty()) {
|
||||
query.addQueryItem("sizeLogic", logic);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue