only get selected datavalues from file

This commit is contained in:
Michael Nilsson
2016-06-13 17:59:36 -04:00
parent 546b1a9d92
commit fd026dae53
3 changed files with 4 additions and 6 deletions

View File

@@ -64,7 +64,7 @@ return {
--"saturn",
--"uranus",
--"neptune",
--"stars",
"stars",
--"stars-denver",
"milkyway",
--"milkyway-eso",

View File

@@ -195,12 +195,10 @@ std::vector<float*> DataProcessorText::processData(std::string data, properties:
last = line.find_first_of(" \t", first);
last = (last > 0)? last : lineSize;
if(option >= 0){
if(option >= 0 && std::find(selectedOptions.begin(), selectedOptions.end(), option) != selectedOptions.end()){
// boost::spirit::qi::parse(&line[first], &line[last], boost::spirit::qi::float_, value);
value = std::stof(line.substr(first, last));
if(std::find(selectedOptions.begin(), selectedOptions.end(), option) != selectedOptions.end())
dataOptions[option][numValues] = processDataPoint(value, option);
dataOptions[option][numValues] = processDataPoint(value, option);
}
option++;