diff --git a/include/fiction/io/write_sqd_layout.hpp b/include/fiction/io/write_sqd_layout.hpp index 0e66161e2..e2b9a71a8 100644 --- a/include/fiction/io/write_sqd_layout.hpp +++ b/include/fiction/io/write_sqd_layout.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -254,12 +255,37 @@ class write_sqd_layout_impl if constexpr (has_sidb_technology_v) { const auto type = this->lyt.get_cell_type(c); - const auto type_str = - type == sidb_technology::cell_type::NORMAL ? "" : - type == sidb_technology::cell_type::INPUT ? fmt::format(siqad::DOT_TYPE, "input") : - type == sidb_technology::cell_type::OUTPUT ? fmt::format(siqad::DOT_TYPE, "output") : - type == sidb_technology::cell_type::LOGIC ? fmt::format(siqad::DOT_TYPE, "logic") : - ""; + + std::string type_str; + + switch (type) + { + case sidb_technology::cell_type::NORMAL: + { + type_str = ""; + break; + } + case sidb_technology::cell_type::INPUT: + { + type_str = fmt::format(siqad::DOT_TYPE, "input"); + break; + } + case sidb_technology::cell_type::OUTPUT: + { + type_str = fmt::format(siqad::DOT_TYPE, "output"); + break; + } + case sidb_technology::cell_type::LOGIC: + { + type_str = fmt::format(siqad::DOT_TYPE, "logic"); + break; + } + default: + { + type_str = ""; + break; + } + } if constexpr (has_siqad_coord_v) {