Skip to content

Commit

Permalink
Initialize with explicit size_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed Aug 15, 2023
1 parent 88f6a72 commit 64e9763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tket/src/Transformations/SingleQubitSquash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ bool SingleQubitSquash::sub_is_better(
// complexity of the expressions. As a crude but adequate measure, we compare
// the total size of the string representations.
return std::accumulate(
sub.begin(), sub.end(), 0,
sub.begin(), sub.end(), std::size_t{0},
[](std::size_t a, const Command &cmd) {
return a + cmd.get_op_ptr()->get_name().size();
}) <
std::accumulate(
chain.begin(), chain.end(), 0,
chain.begin(), chain.end(), std::size_t{0},
[](std::size_t a, const Gate_ptr &gpr) {
return a + gpr->get_name().size();
});
Expand Down

0 comments on commit 64e9763

Please sign in to comment.