mirror of https://github.com/aria2/aria2
				
				
				
			2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added remove(). * src/Option.cc * src/Option.hpull/1/head
							parent
							
								
									b80de5e010
								
							
						
					
					
						commit
						12145ef4c6
					
				| 
						 | 
				
			
			@ -1,3 +1,9 @@
 | 
			
		|||
2009-11-28  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 | 
			
		||||
 | 
			
		||||
	Added remove().
 | 
			
		||||
	* src/Option.cc
 | 
			
		||||
	* src/Option.h
 | 
			
		||||
 | 
			
		||||
2009-11-28  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 | 
			
		||||
 | 
			
		||||
	Removed options which is only valid for URIs specified in
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -99,6 +99,14 @@ double Option::getAsDouble(const std::string& name) const {
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Option::remove(const std::string& name)
 | 
			
		||||
{
 | 
			
		||||
  std::map<std::string, std::string>::iterator i = table.find(name);
 | 
			
		||||
  if(i != table.end()) {
 | 
			
		||||
    table.erase(i);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Option::clear()
 | 
			
		||||
{
 | 
			
		||||
  table.clear();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,6 +61,8 @@ public:
 | 
			
		|||
  bool getAsBool(const std::string& name) const;
 | 
			
		||||
  double getAsDouble(const std::string& name) const;
 | 
			
		||||
  
 | 
			
		||||
  void remove(const std::string& name);
 | 
			
		||||
 | 
			
		||||
  void clear();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue