From 950f33c1bb6260f830e6974583d0e1424146b386 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 25 Jul 2018 17:53:01 -0700 Subject: clangformat --- bba/main.cc | 12 ++++++------ ecp5/main.cc | 10 ++++------ generic/main.cc | 10 ++++------ gui/designwidget.cc | 7 +++---- ice40/bitstream.cc | 5 ++--- ice40/main.cc | 10 ++++------ ice40/pack.cc | 12 ++++++------ 7 files changed, 29 insertions(+), 37 deletions(-) diff --git a/bba/main.cc b/bba/main.cc index cd09f804..9f7da8d2 100644 --- a/bba/main.cc +++ b/bba/main.cc @@ -276,13 +276,13 @@ int main(int argc, char **argv) case 4: data[cursor++] = value >> 24; data[cursor++] = value >> 16; - /* fall-through */ + /* fall-through */ case 2: data[cursor++] = value >> 8; - /* fall-through */ + /* fall-through */ case 1: data[cursor++] = value; - /* fall-through */ + /* fall-through */ case 0: break; default: @@ -293,13 +293,13 @@ int main(int argc, char **argv) case 4: data[cursor + 3] = value >> 24; data[cursor + 2] = value >> 16; - /* fall-through */ + /* fall-through */ case 2: data[cursor + 1] = value >> 8; - /* fall-through */ + /* fall-through */ case 1: data[cursor] = value; - /* fall-through */ + /* fall-through */ case 0: break; default: diff --git a/ecp5/main.cc b/ecp5/main.cc index 90096855..f2db74d7 100644 --- a/ecp5/main.cc +++ b/ecp5/main.cc @@ -100,18 +100,16 @@ int main(int argc, char *argv[]) } if (vm.count("help") || argc == 1) { - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; std::cout << "\n"; std::cout << options << "\n"; return argc != 1; } if (vm.count("version")) { - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; return 1; } diff --git a/generic/main.cc b/generic/main.cc index 3b8b3fe6..d5a65102 100644 --- a/generic/main.cc +++ b/generic/main.cc @@ -75,18 +75,16 @@ int main(int argc, char *argv[]) } if (vm.count("help") || argc == 1) { - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; std::cout << "\n"; std::cout << options << "\n"; return argc != 1; } if (vm.count("version")) { - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; return 1; } diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 93b53926..c17990a5 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -319,7 +319,7 @@ void DesignWidget::newContext(Context *ctx) pip_root->setText(0, "Pips"); pip_root->setFlags(pip_root->flags() & ~Qt::ItemIsSelectable); treeWidget->insertTopLevelItem(0, pip_root); -#ifndef ARCH_ECP5 +#ifndef ARCH_ECP5 if (ctx) { for (auto pip : ctx->getPips()) { auto id = ctx->getPipName(pip); @@ -346,7 +346,7 @@ void DesignWidget::newContext(Context *ctx) for (auto pip : nameToItem[2].toStdMap()) { pip_root->addChild(pip.second); } -#endif +#endif nets_root = new QTreeWidgetItem(treeWidget); nets_root->setText(0, "Nets"); @@ -512,8 +512,7 @@ void DesignWidget::onItemSelectionChanged() if (treeWidget->selectedItems().size() == 0) return; - if (treeWidget->selectedItems().size() > 1) - { + if (treeWidget->selectedItems().size() > 1) { std::vector decals; for (auto clickItem : treeWidget->selectedItems()) { IdString value = static_cast(clickItem)->getData(); diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc index e9851a83..af5febce 100644 --- a/ice40/bitstream.cc +++ b/ice40/bitstream.cc @@ -566,9 +566,8 @@ void write_asc(const Context *ctx, std::ostream &out) set_config(ti, config.at(y).at(x), "Cascade.IPCON_LC0" + std::to_string(lc_idx) + "_inmux02_5", true); else - set_config(ti, config.at(y).at(x), - "Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) + "_LC0" + - std::to_string(lc_idx) + "_inmux02_5", + set_config(ti, config.at(y).at(x), "Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) + + "_LC0" + std::to_string(lc_idx) + "_inmux02_5", true); } } diff --git a/ice40/main.cc b/ice40/main.cc index 4de05d00..6201831a 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -144,18 +144,16 @@ int main(int argc, char *argv[]) #endif if (vm.count("help") || argc == 1) { help: - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; std::cout << "\n"; std::cout << options << "\n"; return argc != 1; } if (vm.count("version")) { - std::cout << boost::filesystem::basename(argv[0]) - << " -- Next Generation Place and Route (git " - "sha1 " GIT_COMMIT_HASH_STR ")\n"; + std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git " + "sha1 " GIT_COMMIT_HASH_STR ")\n"; return 1; } diff --git a/ice40/pack.cc b/ice40/pack.cc index 91dcf846..8182eb70 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -662,12 +662,12 @@ static void pack_special(Context *ctx) auto feedback_path = packed->params[ctx->id("FEEDBACK_PATH")]; packed->params[ctx->id("FEEDBACK_PATH")] = - feedback_path == "DELAY" - ? "0" - : feedback_path == "SIMPLE" ? "1" - : feedback_path == "PHASE_AND_DELAY" - ? "2" - : feedback_path == "EXTERNAL" ? "6" : feedback_path; + feedback_path == "DELAY" ? "0" : feedback_path == "SIMPLE" + ? "1" + : feedback_path == "PHASE_AND_DELAY" + ? "2" + : feedback_path == "EXTERNAL" ? "6" + : feedback_path; packed->params[ctx->id("PLLTYPE")] = std::to_string(sb_pll40_type(ctx, ci)); NetInfo *pad_packagepin_net = nullptr; -- cgit v1.2.3