From d53eac45ba2f640573a36459efa606239216c7ab Mon Sep 17 00:00:00 2001 From: Stephan Aiche Date: Thu, 13 Feb 2014 20:42:28 +0100 Subject: [PATCH] [FIX] fixed missing std:: for vector * also applied uncrustify --- .../include/OpenMS/FORMAT/MascotGenericFile.h | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/openms/include/OpenMS/FORMAT/MascotGenericFile.h b/src/openms/include/OpenMS/FORMAT/MascotGenericFile.h index 7e334624c73..2b41d49307a 100644 --- a/src/openms/include/OpenMS/FORMAT/MascotGenericFile.h +++ b/src/openms/include/OpenMS/FORMAT/MascotGenericFile.h @@ -103,7 +103,7 @@ namespace OpenMS is.seekg(0, std::ios::beg); UInt spectrum_number(0); - Size line_number(0); // carry line number for error messages within getNextSpectrum() + Size line_number(0); // carry line number for error messages within getNextSpectrum() typename MapType::SpectrumType spectrum; spectrum.setMSLevel(2); @@ -172,9 +172,9 @@ namespace OpenMS if (line.empty()) continue; - if (isdigit(line[0])) - { // actual data .. this comes first, since its the most common case - vector split; + if (isdigit(line[0])) // actual data .. this comes first, since its the most common case + { + std::vector split; do { if (line.empty()) @@ -186,7 +186,7 @@ namespace OpenMS line.split(' ', split); if (split.size() >= 2) { - p.setPosition(split[0].toDouble()); + p.setPosition(split[0].toDouble()); p.setIntensity(split[1].toDouble()); spectrum.push_back(p); } @@ -206,11 +206,11 @@ namespace OpenMS throw Exception::ParseError(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Reached end of file. Found \"BEGIN IONS\" but not the corresponding \"END IONS\"!", ""); } } - else if (line.hasPrefix("PEPMASS")) - { // parse precursor position + else if (line.hasPrefix("PEPMASS")) // parse precursor position + { String tmp = line.substr(8); tmp.substitute('\t', ' '); - vector split; + std::vector split; tmp.split(' ', split); if (split.size() == 1) { @@ -244,7 +244,7 @@ namespace OpenMS { try { - vector split; + std::vector split; line.split(',', split); if (!split.empty()) { @@ -252,7 +252,7 @@ namespace OpenMS { if (split[i].hasSubstring("min")) { - vector split2; + std::vector split2; split[i].trim().split(' ', split2); if (!split2.empty()) { @@ -265,7 +265,7 @@ namespace OpenMS catch (Exception::BaseException& /*e*/) { // just do nothing and write the whole title to spec - vector split; + std::vector split; line.split('=', split); if (split.size() >= 2) { @@ -275,7 +275,7 @@ namespace OpenMS } else // just write the title as metainfo to the spectrum { - vector split; + std::vector split; line.split('=', split); if (split.size() == 2) { @@ -289,7 +289,8 @@ namespace OpenMS } return false; // found end of file - }; + } + }; } // namespace OpenMS