From be47fc3e9a81a4890b05223ae18803cb07674dc9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 25 Jun 2019 18:19:25 +0200 Subject: clangformat run --- ecp5/main.cc | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'ecp5/main.cc') diff --git a/ecp5/main.cc b/ecp5/main.cc index fa0783e1..75126cea 100644 --- a/ecp5/main.cc +++ b/ecp5/main.cc @@ -34,7 +34,7 @@ class ECP5CommandHandler : public CommandHandler public: ECP5CommandHandler(int argc, char **argv); virtual ~ECP5CommandHandler(){}; - std::unique_ptr createContext(std::unordered_map &values) override; + std::unique_ptr createContext(std::unordered_map &values) override; void setupArchContext(Context *ctx) override{}; void customAfterLoad(Context *ctx) override; void validate() override; @@ -100,16 +100,20 @@ void ECP5CommandHandler::customBitstream(Context *ctx) static std::string speedString(ArchArgs::SpeedGrade speed) { - switch(speed){ - case ArchArgs::SPEED_6: return "6"; - case ArchArgs::SPEED_7: return "7"; - case ArchArgs::SPEED_8: return "8"; - case ArchArgs::SPEED_8_5G: return "8"; + switch (speed) { + case ArchArgs::SPEED_6: + return "6"; + case ArchArgs::SPEED_7: + return "7"; + case ArchArgs::SPEED_8: + return "8"; + case ArchArgs::SPEED_8_5G: + return "8"; } return ""; } -std::unique_ptr ECP5CommandHandler::createContext(std::unordered_map &values) +std::unique_ptr ECP5CommandHandler::createContext(std::unordered_map &values) { ArchArgs chipArgs; chipArgs.type = ArchArgs::NONE; @@ -154,15 +158,15 @@ std::unique_ptr ECP5CommandHandler::createContext(std::unordered_map ECP5CommandHandler::createContext(std::unordered_map ECP5CommandHandler::createContext(std::unordered_map ECP5CommandHandler::createContext(std::unordered_map(new Context(chipArgs)); - for(auto &val : values) + for (auto &val : values) ctx->settings[ctx->id(val.first)] = val.second; ctx->settings[ctx->id("arch.package")] = ctx->archArgs().package; ctx->settings[ctx->id("arch.speed")] = speedString(ctx->archArgs().speed); -- cgit v1.2.3