diff --git a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp index 368ea90bd..753335231 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp @@ -191,7 +191,7 @@ namespace Opm { } } - double TimeMap::getTimeStepLength(int tStepIdx) const + double TimeMap::getTimeStepLength(size_t tStepIdx) const { assert(0 <= tStepIdx && tStepIdx < numTimesteps()); const boost::posix_time::ptime &t1 @@ -203,7 +203,7 @@ namespace Opm { return static_cast(deltaT.total_milliseconds())/1000.0; } - double TimeMap::getTimePassedUntil(int tStepIdx) const + double TimeMap::getTimePassedUntil(size_t tStepIdx) const { assert(0 <= tStepIdx && tStepIdx < numTimesteps()); const boost::posix_time::ptime &t1 diff --git a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp index c126bb4be..df3ecb435 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp @@ -41,12 +41,12 @@ namespace Opm { int numTimesteps() const { return m_timeList.size() - 1; } double getTotalTime() const; /// Return the date and time where a given time step starts. - boost::posix_time::ptime getStartTime(int tStepIdx) const + boost::posix_time::ptime getStartTime(size_t tStepIdx) const { return m_timeList[tStepIdx]; } /// Return the period of time in seconds which passed between the start of the simulation and a given time step. - double getTimePassedUntil(int tStepIdx) const; + double getTimePassedUntil(size_t tStepIdx) const; /// Return the length of a given time step in seconds. - double getTimeStepLength(int tStepIdx) const; + double getTimeStepLength(size_t tStepIdx) const; static boost::posix_time::ptime timeFromEclipse(DeckRecordConstPtr dateRecord); static boost::posix_time::ptime timeFromEclipse(int day , const std::string& month, int year, const std::string& eclipseTimeString = "00:00:00.000"); static boost::posix_time::time_duration dayTimeFromEclipse(const std::string& eclipseTimeString);