Skip to content

Commit

Permalink
Fix unsigned integer check in Solution.h
Browse files Browse the repository at this point in the history
  • Loading branch information
g3bk47 authored Feb 4, 2025
1 parent e6f3e9d commit 4cd6382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cantera/base/Solution.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ class Solution : public std::enable_shared_from_this<Solution>

//! Get the name of an adjacent phase by index
string adjacentName(size_t i) const {
if (i < 0 || i >= m_adjacent.size()) {
throw CanteraError("Solution::adjacentName", "Invalid index {}.", i);
if (i >= m_adjacent.size()) {
throw IndexError("Solution::adjacentName", "m_adjacent", i, m_adjacent.size()-1);

Check warning on line 119 in include/cantera/base/Solution.h

View check run for this annotation

Codecov / codecov/patch

include/cantera/base/Solution.h#L119

Added line #L119 was not covered by tests
}
return m_adjacent.at(i)->name();
}
Expand Down

0 comments on commit 4cd6382

Please sign in to comment.