Added FastSet/Map exists function
							parent
							
								
									957afb4835
								
							
						
					
					
						commit
						5b15b11261
					
				| 
						 | 
				
			
			@ -58,6 +58,9 @@ public:
 | 
			
		|||
    return std::map<KEY,VALUE>(this->begin(), this->end());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /** Handy 'exists' function */
 | 
			
		||||
  bool exists(const KEY& e) const { return find(e) != end(); }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
  /** Serialization function */
 | 
			
		||||
  friend class boost::serialization::access;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,6 +91,9 @@ public:
 | 
			
		|||
    return std::set<VALUE>(this->begin(), this->end());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /** Handy 'exists' function */
 | 
			
		||||
  bool exists(const VALUE& e) const { return find(e) != end(); }
 | 
			
		||||
 | 
			
		||||
  /** Print to implement Testable */
 | 
			
		||||
  void print(const std::string& str = "") const { FastSetTestableHelper<VALUE>::print(*this, str); }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue