Fix unsigned integer check in Solution.h

This commit is contained in:
ThorstenZirwes 2025-02-04 22:29:24 +01:00 committed by GitHub
parent e6f3e9d448
commit 4cd6382048
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,8 +115,8 @@ public:
//! 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);
}
return m_adjacent.at(i)->name();
}