mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed fvector and replaced with FixedArray.
Needs replacing with std::array when we get to c++11
This commit is contained in:
@@ -144,7 +144,7 @@ QList<caf::PdmOptionItemInfo> RimCellEdgeResultSlot::calculateValueOptions(const
|
||||
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
|
||||
std::map<QString, caf::fvector<QString, 6> > varBaseNameToVarsMap;
|
||||
std::map<QString, caf::FixedArray<QString, 6> > varBaseNameToVarsMap;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < varList.size(); ++i)
|
||||
@@ -164,7 +164,7 @@ QList<caf::PdmOptionItemInfo> RimCellEdgeResultSlot::calculateValueOptions(const
|
||||
}
|
||||
}
|
||||
|
||||
std::map<QString, caf::fvector<QString, 6> >::iterator it;
|
||||
std::map<QString, caf::FixedArray<QString, 6> >::iterator it;
|
||||
|
||||
for (it = varBaseNameToVarsMap.begin(); it != varBaseNameToVarsMap.end(); ++it)
|
||||
{
|
||||
@@ -174,16 +174,16 @@ QList<caf::PdmOptionItemInfo> RimCellEdgeResultSlot::calculateValueOptions(const
|
||||
bool firstText = true;
|
||||
for (cubeFaceIdx = 0; cubeFaceIdx < 6; ++cubeFaceIdx)
|
||||
{
|
||||
if (!it->second.v[cubeFaceIdx].isEmpty())
|
||||
if (!it->second[cubeFaceIdx].isEmpty())
|
||||
{
|
||||
if (firstText)
|
||||
{
|
||||
optionUiName += it->second.v[cubeFaceIdx];
|
||||
optionUiName += it->second[cubeFaceIdx];
|
||||
firstText = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
optionUiName += QString(", ") + it->second.v[cubeFaceIdx];
|
||||
optionUiName += QString(", ") + it->second[cubeFaceIdx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,23 +22,12 @@
|
||||
#include "cafPdmField.h"
|
||||
#include "cafAppEnum.h"
|
||||
#include "RimDefines.h"
|
||||
#include "cafFixedArray.h"
|
||||
|
||||
class RigCaseCellResultsData;
|
||||
class RimLegendConfig;
|
||||
class RimReservoirView;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <typename T, size_t vectorSize>
|
||||
class fvector
|
||||
{
|
||||
public:
|
||||
T v[vectorSize];
|
||||
T& operator[] (size_t idx) { return v[idx]; }
|
||||
const T& operator[] (size_t idx) const { return v[idx]; }
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -86,7 +75,7 @@ private:
|
||||
void resetResultIndices();
|
||||
void updateIgnoredScalarValue();
|
||||
protected:
|
||||
caf::fvector<std::pair<QString, size_t>, 6 > m_resultNameToIndexPairs;
|
||||
caf::FixedArray<std::pair<QString, size_t>, 6 > m_resultNameToIndexPairs;
|
||||
caf::PdmPointer<RimReservoirView> m_reservoirView;
|
||||
double m_ignoredResultScalar;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user