Skip to content

Commit

Permalink
🚨 Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa committed Jul 11, 2023
1 parent d440c1d commit 058a80f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions cli/cmd/physical_design/hex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class hex_command : public command
return;
}

const auto& lyt_ptr = gls.current();
const auto& lyt = gls.current();

const auto check_clocking_scheme = [](auto&& lyt_ptr)
{ return lyt_ptr->is_clocking_scheme(fiction::clock_name::TWODDWAVE); };

// error case: layout is not 2DDWave-clocked
if (const auto is_twoddwave_clocked = std::visit(check_clocking_scheme, lyt_ptr); !is_twoddwave_clocked)
if (const auto is_twoddwave_clocked = std::visit(check_clocking_scheme, lyt); !is_twoddwave_clocked)
{
env->out() << "[e] layout has to be 2DDWave-clocked" << std::endl;
return;
Expand All @@ -74,9 +74,9 @@ class hex_command : public command

try
{
if (const auto lyt = std::visit(apply_hexagonalization, lyt_ptr); lyt.has_value())
if (const auto hex_lyt = std::visit(apply_hexagonalization, lyt); hex_lyt.has_value())
{
gls.extend() = std::make_shared<fiction::hex_even_row_gate_clk_lyt>(*lyt);
gls.extend() = std::make_shared<fiction::hex_even_row_gate_clk_lyt>(*hex_lyt);
}
}
catch (...)
Expand Down
4 changes: 2 additions & 2 deletions include/fiction/layouts/cartesian_layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ class cartesian_layout
*/
[[nodiscard]] constexpr bool is_ground_layer(const OffsetCoordinateType& c) const noexcept
{
return c.z == 0ull;
return c.z == decltype(c.z){0};
}
/**
* Returns whether the given coordinate is located in a crossing layer where z is not minimal.
Expand All @@ -601,7 +601,7 @@ class cartesian_layout
*/
[[nodiscard]] constexpr bool is_crossing_layer(const OffsetCoordinateType& c) const noexcept
{
return c.z > 0ull;
return c.z > decltype(c.z){0};
}
/**
* Returns whether the given coordinate is located within the layout bounds.
Expand Down
24 changes: 12 additions & 12 deletions include/fiction/utils/truth_table_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ inline kitty::dynamic_truth_table create_double_wire_tt() noexcept
{
static constexpr const char* truth_table_string = "11100100";

kitty::dynamic_truth_table tt(3);
kitty::create_from_binary_string(tt, truth_table_string);
kitty::dynamic_truth_table table{3};
kitty::create_from_binary_string(table, truth_table_string);

return tt;
return table;
}
/**
* Creates and returns a truth table that implements a crossing in two variables.
Expand All @@ -150,10 +150,10 @@ inline kitty::dynamic_truth_table create_crossing_wire_tt() noexcept
{
static constexpr const char* truth_table_string = "11011000";

kitty::dynamic_truth_table tt(3);
kitty::create_from_binary_string(tt, truth_table_string);
kitty::dynamic_truth_table table{3};
kitty::create_from_binary_string(table, truth_table_string);

return tt;
return table;
}
/**
* Creates and returns a truth table that implements a fan-out in one variable.
Expand All @@ -164,10 +164,10 @@ inline kitty::dynamic_truth_table create_fan_out_tt() noexcept
{
static constexpr const char* truth_table_string = "1100";

kitty::dynamic_truth_table tt(2);
kitty::create_from_binary_string(tt, truth_table_string);
kitty::dynamic_truth_table table{2};
kitty::create_from_binary_string(table, truth_table_string);

return tt;
return table;
}
/**
* Creates and returns a truth table that implements a half-adder in two variables.
Expand All @@ -178,10 +178,10 @@ inline kitty::dynamic_truth_table create_half_adder_tt() noexcept
{
static constexpr const char* truth_table_string = "01101000";

kitty::dynamic_truth_table tt(3);
kitty::create_from_binary_string(tt, truth_table_string);
kitty::dynamic_truth_table table{3};
kitty::create_from_binary_string(table, truth_table_string);

return tt;
return table;
}

/**
Expand Down

0 comments on commit 058a80f

Please sign in to comment.