From 2bcd36956daea104fed149d04bc852c13445bf54 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Wed, 25 Mar 2015 16:46:28 -0700 Subject: [PATCH] Explicitly specify OCResourceIdentifier assignments/ctors The OCResourceIdentifier proxy class depends on compiler rules to determine validity of constructors and assignments. This patch correctly explicitly specifies these values. Note: This patch does NOT change any behavior or functionality, it solely specifies behavior explicitly rather than implicitly. Change-Id: I5110cb10e07112e7786c56fedee43f76cfdab3bd Signed-off-by: Erich Keane Reviewed-on: https://gerrit.iotivity.org/gerrit/572 Tested-by: jenkins-iotivity Reviewed-by: Sudarshan Prasad --- resource/include/OCResource.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resource/include/OCResource.h b/resource/include/OCResource.h index 6d3887431..ff4a08073 100644 --- a/resource/include/OCResource.h +++ b/resource/include/OCResource.h @@ -56,6 +56,16 @@ namespace OC friend std::ostream& operator <<(std::ostream& os, const OCResourceIdentifier& ri); public: + OCResourceIdentifier() = delete; + + OCResourceIdentifier(const OCResourceIdentifier&) = default; + + OCResourceIdentifier(OCResourceIdentifier&&) = default; + + OCResourceIdentifier& operator=(const OCResourceIdentifier&) = delete; + + OCResourceIdentifier& operator=(OCResourceIdentifier&&) = delete; + bool operator==(const OCResourceIdentifier &other) const; bool operator!=(const OCResourceIdentifier &other) const; -- 2.34.1