mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Use delete instead of hiding copy constructors and assignments (#1820)
				
					
				
			This commit is contained in:
		| @@ -12,6 +12,7 @@ class SpyingAllocator { | ||||
|  public: | ||||
|   SpyingAllocator(const SpyingAllocator& src) : _log(src._log) {} | ||||
|   SpyingAllocator(std::ostream& log) : _log(log) {} | ||||
|   SpyingAllocator& operator=(const SpyingAllocator& src) = delete; | ||||
|  | ||||
|   void* allocate(size_t n) { | ||||
|     _log << "A" << n; | ||||
| @@ -23,8 +24,6 @@ class SpyingAllocator { | ||||
|   } | ||||
|  | ||||
|  private: | ||||
|   SpyingAllocator& operator=(const SpyingAllocator& src); | ||||
|  | ||||
|   std::ostream& _log; | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user