mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3686 Completion Export : Fix less than operator for RigCompletionDataGridCell
This commit is contained in:
parent
4117e266ed
commit
cbc0e55303
@ -26,6 +26,7 @@
|
||||
RigCompletionDataGridCell::RigCompletionDataGridCell()
|
||||
: m_globalCellIndex(0)
|
||||
, m_lgrName("")
|
||||
, m_gridIndex(0)
|
||||
, m_localCellIndexI(0)
|
||||
, m_localCellIndexJ(0)
|
||||
, m_localCellIndexK(0)
|
||||
@ -58,6 +59,8 @@ RigCompletionDataGridCell::RigCompletionDataGridCell(size_t globalCellIndex, con
|
||||
{
|
||||
m_lgrName = QString::fromStdString(grid->gridName());
|
||||
}
|
||||
|
||||
m_gridIndex = grid->gridIndex();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -75,11 +78,13 @@ bool RigCompletionDataGridCell::operator==(const RigCompletionDataGridCell& othe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigCompletionDataGridCell::operator<(const RigCompletionDataGridCell& other) const
|
||||
{
|
||||
if (m_gridIndex != other.m_gridIndex) return m_gridIndex < other.m_gridIndex;
|
||||
|
||||
if (m_localCellIndexI != other.m_localCellIndexI) return m_localCellIndexI < other.m_localCellIndexI;
|
||||
if (m_localCellIndexJ != other.m_localCellIndexJ) return m_localCellIndexJ < other.m_localCellIndexJ;
|
||||
if (m_localCellIndexK != other.m_localCellIndexK) return m_localCellIndexK < other.m_localCellIndexK;
|
||||
|
||||
return false;
|
||||
return m_globalCellIndex < other.m_globalCellIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -133,7 +138,7 @@ QString RigCompletionDataGridCell::lgrName() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigCompletionDataGridCell::isMainGridCell() const
|
||||
{
|
||||
|
@ -52,6 +52,7 @@ private:
|
||||
size_t m_globalCellIndex;
|
||||
QString m_lgrName;
|
||||
|
||||
size_t m_gridIndex;
|
||||
size_t m_localCellIndexI;
|
||||
size_t m_localCellIndexJ;
|
||||
size_t m_localCellIndexK;
|
||||
|
Loading…
Reference in New Issue
Block a user