mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
Fix compiler warnings related to converting time_t to double
This commit is contained in:
parent
5c1f5326a0
commit
245d10c5c1
@ -196,8 +196,8 @@ double RigTimeHistoryCurveMerger::interpolationValue(const time_t& interpolation
|
|||||||
bool isSecondValid = RigCurveDataTools::isValidValue(secondValue, removeInterpolatedValues);
|
bool isSecondValid = RigCurveDataTools::isValidValue(secondValue, removeInterpolatedValues);
|
||||||
if (!isSecondValid) return HUGE_VAL;
|
if (!isSecondValid) return HUGE_VAL;
|
||||||
|
|
||||||
double firstDiff = interpolationTimeStep - curveTimeSteps.at(firstI);
|
double firstDiff = fabs(difftime(interpolationTimeStep, curveTimeSteps.at(firstI)));
|
||||||
double secondDiff = curveTimeSteps.at(secondI) - interpolationTimeStep;
|
double secondDiff = fabs(difftime(curveTimeSteps.at(secondI), interpolationTimeStep));
|
||||||
|
|
||||||
double firstWeight = secondDiff / (firstDiff + secondDiff);
|
double firstWeight = secondDiff / (firstDiff + secondDiff);
|
||||||
double secondWeight = firstDiff / (firstDiff + secondDiff);
|
double secondWeight = firstDiff / (firstDiff + secondDiff);
|
||||||
|
Loading…
Reference in New Issue
Block a user