#2453 Stim plan. Removed double string splitting loop

This commit is contained in:
Bjørn Erik Jensen 2018-02-08 11:37:07 +01:00
parent 39949923a6
commit 2e0069456f

View File

@ -224,12 +224,13 @@ std::vector<std::vector<double>> RifStimPlanXmlReader::getAllDepthDataAtTimeSte
if (xmlStream.isCDATA())
{
QString depthDataStr = xmlStream.text().toString();
for (int i = 0; i < depthDataStr.split(' ').size(); i++)
QStringList splitted = depthDataStr.split(' ');
for (int i = 0; i < splitted.size(); i++)
{
if (i < static_cast<int>(startingNegValuesXs)) continue;
else
{
QString value = depthDataStr.split(' ')[i];
QString value = splitted[i];
if ( value != "")
{
propertyValuesAtDepth.push_back(value.toDouble());