Skip to content

Commit

Permalink
Ensure depths are sorted by lowest to highest groundTemperatureDepth
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Dec 18, 2024
1 parent 81d94f5 commit b95e89c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utilities/filetypes/EpwFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4702,6 +4702,9 @@ bool EpwFile::parseGroundTemperatures(const std::string& line) {
return false;
}
}
// Ensure sorted by lower to higher depths
std::sort(m_depths.begin(), m_depths.end(),
[](const auto& lhs, const auto& rhs) { return lhs.groundTemperatureDepth() < rhs.groundTemperatureDepth(); });
return true;
}

Expand Down

0 comments on commit b95e89c

Please sign in to comment.