From 72d65976d710c6b2f2927397c8a24537b008ff20 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 12 Sep 2013 08:29:37 +0200 Subject: [PATCH] Fixed Linux compiler issues p4#: 22388 --- .../ProjectDataModel/RimCommandObject.cpp | 6 +++--- .../ProjectDataModel/RimCommandObject.h | 19 +++++++++++++------ .../ProjectDataModel/RimReservoirView.cpp | 2 +- .../RimWellPathCollection.cpp | 2 +- .../UserInterface/RiuMainWindow.cpp | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimCommandObject.cpp b/ApplicationCode/ProjectDataModel/RimCommandObject.cpp index ba2911bfba..231420759e 100644 --- a/ApplicationCode/ProjectDataModel/RimCommandObject.cpp +++ b/ApplicationCode/ProjectDataModel/RimCommandObject.cpp @@ -99,7 +99,7 @@ void RimCommandExecuteScript::undo() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimCommandFactory::createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector& commandObjects) +void RimCommandFactory::createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector* 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); } } } diff --git a/ApplicationCode/ProjectDataModel/RimCommandObject.h b/ApplicationCode/ProjectDataModel/RimCommandObject.h index a5e9b81ea3..3bd162796c 100644 --- a/ApplicationCode/ProjectDataModel/RimCommandObject.h +++ b/ApplicationCode/ProjectDataModel/RimCommandObject.h @@ -22,13 +22,13 @@ #include "cvfObject.h" #include "cafPdmField.h" #include "cafPdmObject.h" +#include "cafPdmDocument.h" #include -//================================================================================================== -// -// -//================================================================================================== +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- 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& commandObjects); -}; \ No newline at end of file + static void createCommandObjects(const caf::PdmObjectGroup& selectedObjects, std::vector* commandObjects); +}; + diff --git a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp index 87633a9e4f..9db070259b 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp @@ -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(singleWellResultData->firstResultTimeStep())) { continue; } diff --git a/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp b/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp index de3d435b6b..ae46561b5d 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp @@ -294,7 +294,7 @@ RimWellPathAsciiFileReader::WellData RimWellPathAsciiFileReader::readWellData(QS CVF_ASSERT(it != m_fileNameToWellDataGroupMap.end()); - if (indexInFile < it->second.size()) + if (indexInFile < static_cast(it->second.size())) { return it->second[indexInFile]; } diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index 7223f3bc9f..0dfaddcb7d 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -1688,7 +1688,7 @@ void RiuMainWindow::slotCreateCommandObject() m_treeModelPdm->populateObjectGroupFromModelIndexList(selectedModelIndices, &selectedObjects); std::vector commandObjects; - RimCommandFactory::createCommandObjects(selectedObjects, commandObjects); + RimCommandFactory::createCommandObjects(selectedObjects, &commandObjects); for (size_t i = 0; i < commandObjects.size(); i++) {