From 58e3104796480c66a303a4266e6459c7b21295ea Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 18 Jun 2018 14:07:18 +0200 Subject: [PATCH] Updates from clangformat Signed-off-by: Clifford Wolf --- dummy/arch_place.cc | 10 ++-------- frontend/json/jsonparse.cc | 14 ++++++-------- ice40/chip.h | 3 +-- ice40/pack.cc | 4 ++-- ice40/pcf.cc | 3 +-- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/dummy/arch_place.cc b/dummy/arch_place.cc index 4f3e2509..4e712f6d 100644 --- a/dummy/arch_place.cc +++ b/dummy/arch_place.cc @@ -21,14 +21,8 @@ NEXTPNR_NAMESPACE_BEGIN -bool isValidBelForCell(Context *ctx, CellInfo *cell, BelId bel) -{ - return true; -} +bool isValidBelForCell(Context *ctx, CellInfo *cell, BelId bel) { return true; } -bool isBelLocationValid(Context *ctx, BelId bel) -{ - return true; -} +bool isBelLocationValid(Context *ctx, BelId bel) { return true; } NEXTPNR_NAMESPACE_END diff --git a/frontend/json/jsonparse.cc b/frontend/json/jsonparse.cc index 26919d24..3d13a512 100644 --- a/frontend/json/jsonparse.cc +++ b/frontend/json/jsonparse.cc @@ -547,8 +547,8 @@ void json_import_cell(Context *ctx, string modname, for (int paramid = 0; paramid < GetSize(param_node->data_dict_keys); paramid++) { - json_import_cell_params(ctx, modname, cell, param_node, - &cell->params, paramid); + json_import_cell_params(ctx, modname, cell, param_node, &cell->params, + paramid); } attr_node = cell_node->data_dict.at("attributes"); @@ -741,10 +741,9 @@ void json_import(Context *ctx, string modname, JsonNode *node) netnames.resize(netid + 1); netnames.at(netid) = basename + - (num_bits == 1 - ? "" - : std::string("[") + std::to_string(i) + - std::string("]")); + (num_bits == 1 ? "" : std::string("[") + + std::to_string(i) + + std::string("]")); } } } @@ -793,8 +792,7 @@ struct JsonFrontend // JsonFrontend() : Frontend("json", "read JSON file") { } JsonFrontend(void) {} virtual void help() {} - virtual void execute(std::istream *&f, std::string &filename, - Context *ctx) + virtual void execute(std::istream *&f, std::string &filename, Context *ctx) { // log_header(ctx, "Executing JSON frontend.\n"); diff --git a/ice40/chip.h b/ice40/chip.h index 8ba42290..3b4f19d1 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -747,8 +747,7 @@ NEXTPNR_NAMESPACE_END namespace std { template <> struct hash { - std::size_t operator()(NEXTPNR_NAMESPACE_PREFIX BelType bt) const - noexcept + std::size_t operator()(NEXTPNR_NAMESPACE_PREFIX BelType bt) const noexcept { return std::hash()(int(bt)); } diff --git a/ice40/pack.cc b/ice40/pack.cc index b8e2cb8f..7cdfc643 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -39,8 +39,8 @@ static void pack_lut_lutffs(Context *ctx) log_info("cell '%s' is of type '%s'\n", ci->name.c_str(), ci->type.c_str()); if (is_lut(ci)) { - CellInfo *packed = create_ice_cell(ctx, "ICESTORM_LC", - ci->name.str() + "_LC"); + CellInfo *packed = + create_ice_cell(ctx, "ICESTORM_LC", ci->name.str() + "_LC"); std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(packed->attrs, packed->attrs.begin())); packed_cells.insert(ci->name); diff --git a/ice40/pcf.cc b/ice40/pcf.cc index 6fc90118..756aba4a 100644 --- a/ice40/pcf.cc +++ b/ice40/pcf.cc @@ -58,8 +58,7 @@ void apply_pcf(Context *ctx, std::istream &in) if (pin_bel == BelId()) log_error("package does not have a pin named %s\n", pin.c_str()); - fnd_cell->second->attrs["BEL"] = - ctx->getBelName(pin_bel).str(); + fnd_cell->second->attrs["BEL"] = ctx->getBelName(pin_bel).str(); log_info("constrained '%s' to bel '%s'\n", cell.c_str(), fnd_cell->second->attrs["BEL"].c_str()); }