Fixed Linux compiler issues

p4#: 22388
This commit is contained in:
Magne Sjaastad 2013-09-12 08:29:37 +02:00
parent c3adfb7cb0
commit 72d65976d7
5 changed files with 19 additions and 12 deletions

View File

@ -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);
}
}
}

View File

@ -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);
};

View File

@ -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;
}

View File

@ -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];
}

View File

@ -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++)
{