From 86e8471cadf27949f55c24e1cc61d5f29f24a452 Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Tue, 27 Feb 2018 09:42:09 -0800 Subject: [PATCH] kx122: Disable implicit copy/assignment operators Don't let a KX122 instance be copied since copies would share the C device pointer. Signed-off-by: Noel Eck --- src/kx122/kx122.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kx122/kx122.hpp b/src/kx122/kx122.hpp index a4274f67..4b474b96 100644 --- a/src/kx122/kx122.hpp +++ b/src/kx122/kx122.hpp @@ -510,5 +510,9 @@ namespace upm{ private: //Device context kx122_context m_kx122; + + /* Disable implicit copy and assignment operators */ + KX122(const KX122&) = delete; + KX122 &operator=(const KX122&) = delete; }; }