Changeset 3836
- Timestamp:
- Aug 8, 2019, 4:11:37 AM (4 years ago)
- Location:
- branches/0.16-stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.16-stable/NEWS
r3835 r3836 8 8 - utility::Aligner::Cigar::begin(void) and ::end(void) are now 9 9 implemented (see bug #929) 10 - Fixed bug in GFF2 parser when attribute field had space after a 11 semicolon (bug #928) 10 12 11 13 A complete list of closed tickets can be found here [[br]] -
branches/0.16-stable/test/Makefile.am
r3834 r3836 123 123 124 124 # tests not passing through yet 125 XFAIL_TESTS = test/gff.test125 XFAIL_TESTS = 126 126 127 127 DISTRIBUTED_TESTS = \ -
branches/0.16-stable/yat/omic/GFF2.cc
r2919 r3836 24 24 #include "GFF2.h" 25 25 26 #include <cassert> 26 27 #include <string> 27 28 #include <map> … … 34 35 const std::string& str) const 35 36 { 36 size_t i = str.find(' '); 37 std::string key = str.substr(0,i); 38 ++i; 37 size_t offset = str.find_first_not_of(' '); 38 size_t i = str.find_first_of(' ', offset); 39 assert(i >= offset); 40 std::string key = str.substr(offset, i-offset); 41 // trim spaces 42 i = str.find_first_not_of(' ', i+1); 39 43 // trim off embracing '"' 40 44 if (str[i]=='"') 41 45 ++i; 42 size_t n = str.size() - i; 43 if (str[str.size()-1]=='"') 46 // skip trailing spaces 47 size_t n = str.find_last_not_of(' '); 48 // skip training '"' 49 if (str[n] == '"') 44 50 --n; 45 m[key] = str.substr(i,n); 51 // str[n] now points to last char we want to include 52 m[key] = str.substr(i,n-i+1); 46 53 } 47 54
Note: See TracChangeset
for help on using the changeset viewer.