This commit is contained in:
Valk Richard Li 2020-01-27 15:06:52 +08:00 committed by GitHub
parent 2419eba1bb
commit 9ec886bc08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ void abstract_syntax_tree::print_tree(const int n)
std::cout<<std::endl; std::cout<<std::endl;
if(!children.empty()) if(!children.empty())
{ {
for(auto i=children.begin();i!=children.end();++i) for(std::list<abstract_syntax_tree>::iterator i=children.begin();i!=children.end();++i)
i->print_tree(n+1); i->print_tree(n+1);
} }
return; return;

View File

@ -134,7 +134,7 @@ class resource_file
std::cout<<line<<"\t"; std::cout<<line<<"\t";
for(std::list<char>::iterator i=tmp.begin();i!=tmp.end();++i) for(std::list<char>::iterator i=tmp.begin();i!=tmp.end();++i)
{ {
if(32<=*i && *i<128) if(32<=*i)
std::cout<<*i; std::cout<<*i;
else else
std::cout<<" "; std::cout<<" ";

View File

@ -19,7 +19,7 @@ bool check_numerable_string(std::string str)
{ {
int str_len=str.length(); int str_len=str.length();
for(int i=2;i<str_len;++i) for(int i=2;i<str_len;++i)
if(!('0'<=str[i] && str[i]<='9' || 'a'<=str[i] && str[i]<='f' || 'A'<=str[i] && str[i]<='F')) if(!(('0'<=str[i] && str[i]<='9') || ('a'<=str[i] && str[i]<='f') || ('A'<=str[i] && str[i]<='F')))
return false; return false;
return true; return true;
} }