mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Use enum class
This commit is contained in:
@@ -965,9 +965,9 @@ const RigGridBase* RicExportLgrFeature::hostGrid( const RigMainGrid* mainGrid, s
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
LgrNameFactory::LgrNameFactory()
|
||||
{
|
||||
m_counters = { { RigCompletionData::FRACTURE, { "FRAC", 1 } },
|
||||
{ RigCompletionData::FISHBONES, { "FB", 1 } },
|
||||
{ RigCompletionData::PERFORATION, { "PERF", 1 } } };
|
||||
m_counters = { { RigCompletionData::CompletionType::FRACTURE, { "FRAC", 1 } },
|
||||
{ RigCompletionData::CompletionType::FISHBONES, { "FB", 1 } },
|
||||
{ RigCompletionData::CompletionType::PERFORATION, { "PERF", 1 } } };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -977,9 +977,9 @@ QString LgrNameFactory::newName( RigCompletionData::CompletionType completionTyp
|
||||
{
|
||||
switch ( completionType )
|
||||
{
|
||||
case RigCompletionData::FRACTURE:
|
||||
case RigCompletionData::FISHBONES:
|
||||
case RigCompletionData::PERFORATION:
|
||||
case RigCompletionData::CompletionType::FRACTURE:
|
||||
case RigCompletionData::CompletionType::FISHBONES:
|
||||
case RigCompletionData::CompletionType::PERFORATION:
|
||||
{
|
||||
auto& counter = m_counters[completionType];
|
||||
QString name = counter.first + "_" + QString::number( counter.second );
|
||||
|
||||
@@ -89,7 +89,7 @@ class CompletionInfo
|
||||
{
|
||||
public:
|
||||
CompletionInfo()
|
||||
: type( RigCompletionData::CT_UNDEFINED )
|
||||
: type( RigCompletionData::CompletionType::CT_UNDEFINED )
|
||||
, name( "" )
|
||||
, wellPathName( "" )
|
||||
{
|
||||
@@ -112,14 +112,15 @@ public:
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return type != RigCompletionData::CT_UNDEFINED && !name.isEmpty() && !wellPathName.isEmpty();
|
||||
return type != RigCompletionData::CompletionType::CT_UNDEFINED && !name.isEmpty() && !wellPathName.isEmpty();
|
||||
}
|
||||
|
||||
int priority() const
|
||||
{
|
||||
return type == RigCompletionData::FRACTURE
|
||||
? 1
|
||||
: type == RigCompletionData::FISHBONES ? 2 : type == RigCompletionData::PERFORATION ? 3 : 4;
|
||||
return type == RigCompletionData::CompletionType::FRACTURE ? 1
|
||||
: type == RigCompletionData::CompletionType::FISHBONES ? 2
|
||||
: type == RigCompletionData::CompletionType::PERFORATION ? 3
|
||||
: 4;
|
||||
}
|
||||
|
||||
// Sort by priority, then name, then number
|
||||
|
||||
@@ -139,9 +139,9 @@ int RicExportLgrUi::timeStep() const
|
||||
std::set<RigCompletionData::CompletionType> RicExportLgrUi::completionTypes() const
|
||||
{
|
||||
std::set<RigCompletionData::CompletionType> cts;
|
||||
if ( m_includePerforations() ) cts.insert( RigCompletionData::PERFORATION );
|
||||
if ( m_includeFractures() ) cts.insert( RigCompletionData::FRACTURE );
|
||||
if ( m_includeFishbones() ) cts.insert( RigCompletionData::FISHBONES );
|
||||
if ( m_includePerforations() ) cts.insert( RigCompletionData::CompletionType::PERFORATION );
|
||||
if ( m_includeFractures() ) cts.insert( RigCompletionData::CompletionType::FRACTURE );
|
||||
if ( m_includeFishbones() ) cts.insert( RigCompletionData::CompletionType::FISHBONES );
|
||||
return cts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user