diff --git a/lib/io/dsv_io.cpp b/lib/io/dsv_io.cpp index 9668e24..4428acb 100644 --- a/lib/io/dsv_io.cpp +++ b/lib/io/dsv_io.cpp @@ -219,12 +219,7 @@ void gctl::dsv_io::load_text(std::string filename, std::string file_exten, int t tmp_line.erase(0, tmp_line.find_first_not_of(" \t")); tmp_line.erase(tmp_line.find_last_not_of(" \t") + 1); - if (h < head_num_) //读入到头信息中 - { - heads_.push_back(tmp_line); - h++; - } - else if (tmp_line[0] == att_sym_) // 注释行或者标记行 # #! + if (tmp_line[0] == att_sym_) // 注释行或者标记行 # #! { if (tmp_line[1] == tag_sym_) // #! { @@ -232,11 +227,16 @@ void gctl::dsv_io::load_text(std::string filename, std::string file_exten, int t tags_.push_back(tmp_line); continue; } - + // # tmp_line = tmp_line.substr(1); // 去掉第一个字符 annotates_.push_back(tmp_line); } + else if (h < head_num_) //读入到头信息中 + { + heads_.push_back(tmp_line); + h++; + } else lines.push_back(tmp_line); } infile.close();