mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed Linux compiler issues
p4#: 22388
This commit is contained in:
@@ -99,7 +99,7 @@ void RimCommandExecuteScript::undo()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimCommandFactory::createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector<RimCommandObject*>& commandObjects)
|
void RimCommandFactory::createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector<RimCommandObject*>* commandObjects)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < selectedObjects.objects.size(); i++)
|
for (size_t i = 0; i < selectedObjects.objects.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -114,12 +114,12 @@ void RimCommandFactory::createCommandObjects(const caf::PdmObjectGroup& selected
|
|||||||
{
|
{
|
||||||
QTextStream in(&file);
|
QTextStream in(&file);
|
||||||
QByteArray byteArray = file.readAll();
|
QByteArray byteArray = file.readAll();
|
||||||
QString scriptText(byteArray);
|
QString scriptText(byteArray);
|
||||||
|
|
||||||
RimCommandExecuteScript* command = new RimCommandExecuteScript;
|
RimCommandExecuteScript* command = new RimCommandExecuteScript;
|
||||||
command->scriptText = scriptText;
|
command->scriptText = scriptText;
|
||||||
|
|
||||||
commandObjects.push_back(command);
|
commandObjects->push_back(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
#include "cvfObject.h"
|
#include "cvfObject.h"
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
|
#include "cafPdmDocument.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
//==================================================================================================
|
//--------------------------------------------------------------------------------------------------
|
||||||
//
|
///
|
||||||
//
|
//--------------------------------------------------------------------------------------------------
|
||||||
//==================================================================================================
|
|
||||||
class RimCommandObject : public caf::PdmObject
|
class RimCommandObject : public caf::PdmObject
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
@@ -41,6 +41,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
class RimCommandExecuteScript : public RimCommandObject
|
class RimCommandExecuteScript : public RimCommandObject
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
@@ -55,8 +58,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
class RimCommandFactory
|
class RimCommandFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector<RimCommandObject*>& commandObjects);
|
static void createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector<RimCommandObject*>* commandObjects);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1081,7 +1081,7 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
|
|||||||
{
|
{
|
||||||
RigSingleWellResultsData* singleWellResultData = wellResults.at(i);
|
RigSingleWellResultsData* singleWellResultData = wellResults.at(i);
|
||||||
|
|
||||||
if (m_currentTimeStep < singleWellResultData->firstResultTimeStep())
|
if (m_currentTimeStep < static_cast<int>(singleWellResultData->firstResultTimeStep()))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ RimWellPathAsciiFileReader::WellData RimWellPathAsciiFileReader::readWellData(QS
|
|||||||
|
|
||||||
CVF_ASSERT(it != m_fileNameToWellDataGroupMap.end());
|
CVF_ASSERT(it != m_fileNameToWellDataGroupMap.end());
|
||||||
|
|
||||||
if (indexInFile < it->second.size())
|
if (indexInFile < static_cast<int>(it->second.size()))
|
||||||
{
|
{
|
||||||
return it->second[indexInFile];
|
return it->second[indexInFile];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1688,7 +1688,7 @@ void RiuMainWindow::slotCreateCommandObject()
|
|||||||
m_treeModelPdm->populateObjectGroupFromModelIndexList(selectedModelIndices, &selectedObjects);
|
m_treeModelPdm->populateObjectGroupFromModelIndexList(selectedModelIndices, &selectedObjects);
|
||||||
|
|
||||||
std::vector<RimCommandObject*> commandObjects;
|
std::vector<RimCommandObject*> commandObjects;
|
||||||
RimCommandFactory::createCommandObjects(selectedObjects, commandObjects);
|
RimCommandFactory::createCommandObjects(selectedObjects, &commandObjects);
|
||||||
|
|
||||||
for (size_t i = 0; i < commandObjects.size(); i++)
|
for (size_t i = 0; i < commandObjects.size(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user