io/BufferedOutputStream: add method Discard()
This commit is contained in:
		 Max Kellermann
					Max Kellermann
				
			
				
					committed by
					
						 Max Kellermann
						Max Kellermann
					
				
			
			
				
	
			
			
			 Max Kellermann
						Max Kellermann
					
				
			
						parent
						
							d2f84f3df8
						
					
				
				
					commit
					56997290d7
				
			| @@ -111,6 +111,13 @@ public: | ||||
| 	 */ | ||||
| 	void Flush(); | ||||
|  | ||||
| 	/** | ||||
| 	 * Discard buffer contents. | ||||
| 	 */ | ||||
| 	void Discard() noexcept { | ||||
| 		buffer.Clear(); | ||||
| 	} | ||||
|  | ||||
| private: | ||||
| 	bool AppendToBuffer(const void *data, std::size_t size) noexcept; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user