Changeset 4040
- Timestamp:
- Feb 15, 2021, 2:59:04 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/omic/VcfHeader.cc
r3891 r4040 2 2 3 3 /* 4 Copyright (C) 2018, 2020 Peter Johansson4 Copyright (C) 2018, 2020, 2021 Peter Johansson 5 5 6 6 The yat library is free software; you can redistribute it and/or … … 32 32 #include <ostream> 33 33 #include <sstream> 34 35 #include <iostream> 34 #include <utility> 36 35 37 36 namespace theplu { … … 62 61 std::string line; 63 62 while (getline(is, line)) { 64 lines_.push_back( line);63 lines_.push_back(std::move(line)); 65 64 if (is.peek()!='#') // next line does not start with '#' 66 65 break; … … 76 75 line += value; 77 76 if (lines_.empty()) { 78 lines_.push_back( line);77 lines_.push_back(std::move(line)); 79 78 return; 80 79 } … … 288 287 std::string hdr("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT"); 289 288 if (lines_.size() && lines_.back().size()>1 && lines_.back()[1]!='#') 290 lines_.back() = hdr;289 lines_.back() = std::move(hdr); 291 290 else 292 lines_.push_back( hdr);291 lines_.push_back(std::move(hdr)); 293 292 294 293 for (size_t i=0; i<s.size(); ++i) {
Note: See TracChangeset
for help on using the changeset viewer.