OCD: foreach -> C++11 ranged for
This commit is contained in:
		
							parent
							
								
									1511aa9f48
								
							
						
					
					
						commit
						6bd2c7bb38
					
				
					 30 changed files with 849 additions and 874 deletions
				
			
		|  | @ -73,10 +73,10 @@ void XMLWriter::writeEmptyElement(const string & name, | |||
| 
 | ||||
| void XMLWriter::writeAttrs(const XMLAttrs & attrs) | ||||
| { | ||||
|     for (XMLAttrs::const_iterator i = attrs.begin(); i != attrs.end(); ++i) { | ||||
|         output << " " << i->first << "=\""; | ||||
|         for (unsigned int j = 0; j < i->second.size(); ++j) { | ||||
|             char c = i->second[j]; | ||||
|     for (auto & i : attrs) { | ||||
|         output << " " << i.first << "=\""; | ||||
|         for (unsigned int j = 0; j < i.second.size(); ++j) { | ||||
|             char c = i.second[j]; | ||||
|             if (c == '"') output << """; | ||||
|             else if (c == '<') output << "<"; | ||||
|             else if (c == '>') output << ">"; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue