MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / readNextLine_

Method readNextLine_

src/openms/source/CONCEPT/FuzzyStringComparator.cpp:567–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565 } // compareStreams()
566
567 void FuzzyStringComparator::readNextLine_(std::istream& input_stream, std::string& line_string, int& line_number) const
568 {
569 // use TextFile::getLine for reading, since it will remove \r automatically on all platforms without much overhead
570 // This allows to compare otherwise equal lines between files quickly (see compareLines_(...))
571 for (line_string.clear(); static_cast<void>(++line_number), TextFile::getLine(input_stream, line_string); )
572 {
573 if (line_string.empty())
574 {
575 continue; // read next line
576 }
577 std::string::const_iterator iter = line_string.begin(); // loop initialization
578 for (; iter != line_string.end() && isspace((unsigned char)*iter); ++iter)
579 {
580 }
581 // skip over whitespace
582 if (iter != line_string.end())
583 {
584 return; // line is not empty or whitespace only
585 }
586 }
587 }
588
589 bool FuzzyStringComparator::compareFiles(const std::string& filename_1, const std::string& filename_2)
590 {

Callers

nothing calls this directly

Calls 4

clearMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected