mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-31 07:04:14 +03:00 
			
		
		
		
	memory: Hide all copy/assignment ops for class w/heap allocation
Many of the UPM libraries allocate space on the heap but do not explicitly handle copying and assignment. This commit uses C++11 delete to forbit both the copy and assignment operator for these classes. The C++ examples which used assignment operators to initialize class instances were also updated since it did not appear necessary in those cases to use the assignment operator. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
		| @@ -247,6 +247,10 @@ namespace upm { | ||||
|         mma7660_context m_mma7660; | ||||
|  | ||||
|     private: | ||||
|         /* Disable implicit copy and assignment operators */ | ||||
|         MMA7660(const MMA7660&) = delete; | ||||
|         MMA7660 &operator=(const MMA7660&) = delete; | ||||
|  | ||||
| #if defined(SWIGJAVA) || defined(JAVACALLBACK) | ||||
|         void installISR(int pin, void (*isr)(void *), void *arg); | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Noel Eck
					Noel Eck