From da74a425d23352d7cddf9d1c4b0b7c86dd567c40 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 1 Feb 2021 14:28:32 -0800 Subject: Run "make clangformat". Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- gowin/arch.cc | 4 ++-- gowin/arch.h | 35 +++++++++++------------------------ 2 files changed, 13 insertions(+), 26 deletions(-) (limited to 'gowin') diff --git a/gowin/arch.cc b/gowin/arch.cc index cd4048ca..5a1a56e3 100644 --- a/gowin/arch.cc +++ b/gowin/arch.cc @@ -741,11 +741,11 @@ Arch::Arch(ArchArgs args) : args(args) decal_graphics[IdString()]; std::unordered_set bel_types; - for(BelId bel : getBels()) { + for (BelId bel : getBels()) { bel_types.insert(getBelType(bel)); } - for(IdString bel_type : bel_types) { + for (IdString bel_type : bel_types) { cell_types.push_back(bel_type); } } diff --git a/gowin/arch.h b/gowin/arch.h index 6304a15c..f12c604e 100644 --- a/gowin/arch.h +++ b/gowin/arch.h @@ -422,38 +422,25 @@ struct Arch : BaseCtx // Get the TimingClockingInfo of a port TimingClockingInfo getPortClockingInfo(const CellInfo *cell, IdString port, int index) const; - bool isValidBelForCellType(IdString cell_type, BelId bel) const { - return cell_type == getBelType(bel); - } + bool isValidBelForCellType(IdString cell_type, BelId bel) const { return cell_type == getBelType(bel); } - const std::vector &getCellTypes() const { - return cell_types; - } + const std::vector &getCellTypes() const { return cell_types; } - std::vector getBelBuckets() const { - return cell_types; - } + std::vector getBelBuckets() const { return cell_types; } - IdString getBelBucketName(BelBucketId bucket) const { - return bucket; - } + IdString getBelBucketName(BelBucketId bucket) const { return bucket; } - BelBucketId getBelBucketByName(IdString name) const { - return name; - } + BelBucketId getBelBucketByName(IdString name) const { return name; } - BelBucketId getBelBucketForBel(BelId bel) const { - return getBelType(bel); - } + BelBucketId getBelBucketForBel(BelId bel) const { return getBelType(bel); } - BelBucketId getBelBucketForCellType(IdString cell_type) const { - return cell_type; - } + BelBucketId getBelBucketForCellType(IdString cell_type) const { return cell_type; } - std::vector getBelsInBucket(BelBucketId bucket) const { + std::vector getBelsInBucket(BelBucketId bucket) const + { std::vector bels; - for(BelId bel : getBels()) { - if(getBelType(bel) == bucket) { + for (BelId bel : getBels()) { + if (getBelType(bel) == bucket) { bels.push_back(bel); } } -- cgit v1.2.3