mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Fixed Linux compile issues
This commit is contained in:
parent
19737aa99a
commit
741debebd2
@ -26,4 +26,4 @@ class RivColorTableArray
|
||||
{
|
||||
public:
|
||||
static cvf::ref<cvf::Color3fArray> colorTableArray();
|
||||
};
|
||||
};
|
||||
|
@ -130,6 +130,18 @@ RimFault* RimFaultCollection::findFaultByName(QString name)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// A comparing function used to sort Faults in the RimFaultCollection::syncronizeFaults() method
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
bool faultComparator(const cvf::ref<RigFault>& a, const cvf::ref<RigFault>& b)
|
||||
{
|
||||
CVF_TIGHT_ASSERT(a.notNull() && b.notNull());
|
||||
|
||||
int compareValue = a->name().compare(b->name(), Qt::CaseInsensitive);
|
||||
|
||||
return (compareValue < 0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -144,21 +156,7 @@ void RimFaultCollection::syncronizeFaults()
|
||||
|
||||
cvf::Collection<RigFault> rigFaults(constRigFaults);
|
||||
|
||||
// Sort based on name
|
||||
class FaultComparator
|
||||
{
|
||||
public:
|
||||
bool operator()(const cvf::ref<RigFault>& a, const cvf::ref<RigFault>& b) const
|
||||
{
|
||||
CVF_TIGHT_ASSERT(a.notNull() && b.notNull());
|
||||
|
||||
int compareValue = a->name().compare(b->name(), Qt::CaseInsensitive);
|
||||
|
||||
return (compareValue < 0);
|
||||
}
|
||||
} myFaultComparator;
|
||||
|
||||
std::sort(rigFaults.begin(), rigFaults.end(), myFaultComparator);
|
||||
std::sort(rigFaults.begin(), rigFaults.end(), faultComparator);
|
||||
|
||||
std::vector<caf::PdmPointer<RimFault> > newFaults;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user