Skip to content

Commit

Permalink
Updates from clangformat
Browse files Browse the repository at this point in the history
Signed-off-by: Clifford Wolf <[email protected]>
  • Loading branch information
cliffordwolf committed Jun 18, 2018
1 parent 8ee149f commit 58e3104
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
10 changes: 2 additions & 8 deletions dummy/arch_place.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 6 additions & 8 deletions frontend/json/jsonparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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("]"));
}
}
}
Expand Down Expand Up @@ -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");

Expand Down
3 changes: 1 addition & 2 deletions ice40/chip.h
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,7 @@ NEXTPNR_NAMESPACE_END
namespace std {
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelType>
{
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>()(int(bt));
}
Expand Down
4 changes: 2 additions & 2 deletions ice40/pack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions ice40/pcf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 58e3104

Please sign in to comment.