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:
parent
c3adfb7cb0
commit
72d65976d7
@ -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++)
|
||||
{
|
||||
@ -114,12 +114,12 @@ void RimCommandFactory::createCommandObjects(const caf::PdmObjectGroup& selected
|
||||
{
|
||||
QTextStream in(&file);
|
||||
QByteArray byteArray = file.readAll();
|
||||
QString scriptText(byteArray);
|
||||
QString scriptText(byteArray);
|
||||
|
||||
RimCommandExecuteScript* command = new RimCommandExecuteScript;
|
||||
command->scriptText = scriptText;
|
||||
|
||||
commandObjects.push_back(command);
|
||||
commandObjects->push_back(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,13 +22,13 @@
|
||||
#include "cvfObject.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmDocument.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RimCommandObject : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
@ -41,6 +41,9 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RimCommandExecuteScript : public RimCommandObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
@ -55,8 +58,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RimCommandFactory
|
||||
{
|
||||
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);
|
||||
|
||||
if (m_currentTimeStep < singleWellResultData->firstResultTimeStep())
|
||||
if (m_currentTimeStep < static_cast<int>(singleWellResultData->firstResultTimeStep()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ RimWellPathAsciiFileReader::WellData RimWellPathAsciiFileReader::readWellData(QS
|
||||
|
||||
CVF_ASSERT(it != m_fileNameToWellDataGroupMap.end());
|
||||
|
||||
if (indexInFile < it->second.size())
|
||||
if (indexInFile < static_cast<int>(it->second.size()))
|
||||
{
|
||||
return it->second[indexInFile];
|
||||
}
|
||||
|
@ -1688,7 +1688,7 @@ void RiuMainWindow::slotCreateCommandObject()
|
||||
m_treeModelPdm->populateObjectGroupFromModelIndexList(selectedModelIndices, &selectedObjects);
|
||||
|
||||
std::vector<RimCommandObject*> commandObjects;
|
||||
RimCommandFactory::createCommandObjects(selectedObjects, commandObjects);
|
||||
RimCommandFactory::createCommandObjects(selectedObjects, &commandObjects);
|
||||
|
||||
for (size_t i = 0; i < commandObjects.size(); i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user