From 2e0069456f9c165b825194e0a65e9dc085f7a6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Thu, 8 Feb 2018 11:37:07 +0100 Subject: [PATCH] #2453 Stim plan. Removed double string splitting loop --- ApplicationCode/FileInterface/RifStimPlanXmlReader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/FileInterface/RifStimPlanXmlReader.cpp b/ApplicationCode/FileInterface/RifStimPlanXmlReader.cpp index ab99c3747b..13587f0f3b 100644 --- a/ApplicationCode/FileInterface/RifStimPlanXmlReader.cpp +++ b/ApplicationCode/FileInterface/RifStimPlanXmlReader.cpp @@ -224,12 +224,13 @@ std::vector> 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(startingNegValuesXs)) continue; else { - QString value = depthDataStr.split(' ')[i]; + QString value = splitted[i]; if ( value != "") { propertyValuesAtDepth.push_back(value.toDouble());