File tree Expand file tree Collapse file tree 1 file changed +0
-58
lines changed
Expand file tree Collapse file tree 1 file changed +0
-58
lines changed Original file line number Diff line number Diff line change @@ -82,63 +82,6 @@ string vectorIntToStr(const vector<int> &vec) {
8282 return str;
8383}
8484
85-
86- #if defined(__i386__) || defined(__x86_64__)
87- bool isHeaderLine (const string &line) {
88- if (line[0 ] == ' >' ) {
89- return true ;
90- }
91- if (line[0 ] == ' !' ) {
92- return true ;
93- }
94- if (line[0 ] == ' #' ) {
95- return true ;
96- }
97-
98- if (line.length () > 4 ) {
99- uint32_t peek = *(uint32_t *)line.c_str () | 0x20202020u ;
100- const char * full_text = NULL ;
101- bool require_space = false ;
102- bool require_digit = false ;
103- switch (peek) {
104- case 0x6f726863 :
105- full_text = " chrom" ;
106- require_space = true ;
107- require_digit = false ;
108- break ;
109- case 0x20726863 :
110- case 0x09726863 :
111- full_text = " chr" ;
112- require_space = require_digit = true ;
113- break ;
114- case 0x776f7262 :
115- full_text = " browser" ;
116- break ;
117- case 0x63617274 :
118- full_text = " track" ;
119- break ;
120- case 0x69736976 :
121- full_text = " visibility" ;
122- break ;
123- default :
124- return false ;
125- }
126- if (full_text) {
127- const char * ptr = NULL ;
128- for (ptr = line.c_str (); *ptr && *full_text; ptr ++, full_text ++) {
129- char c = *ptr;
130- if (c >= ' A' && c <= ' Z' ) c += 32 ;
131- if (c != *full_text) return false ;
132- }
133- if (require_space && !isspace (*(ptr++))) return false ;
134- if (require_digit && !isdigit (*(ptr++))) return false ;
135- return true ;
136- }
137- }
138-
139- return false ;
140- }
141- #else
14285bool isHeaderLine (const string &line) {
14386 if (line[0 ] == ' >' ) {
14487 return true ;
@@ -172,4 +115,3 @@ bool isHeaderLine(const string &line) {
172115 }
173116 return false ;
174117}
175- #endif
You can’t perform that action at this time.
0 commit comments