Skip to content

Commit

Permalink
putting brackets around if and else
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
  • Loading branch information
sacpis committed Nov 18, 2024
1 parent 9bde3da commit b366e25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runtime/cudaq/spin/spin_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,12 @@ spin_op &spin_op::operator+=(const spin_op &v) noexcept {
auto iter = terms.find(term);
if (iter != terms.end()) {
iter->second += coeff;
if (std::abs(iter->second) < 1e-12)
if (std::abs(iter->second) < 1e-12) {
terms.erase(iter);
} else
}
} else {
terms.emplace(term, coeff);
}
}

return *this;
Expand Down

0 comments on commit b366e25

Please sign in to comment.