aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-09-08 16:49:17 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-09-11 08:33:24 +0200
commit0a254a03686bff26309976f24a35fea8af97f56a (patch)
tree63716a02923807ecf2a97ed5f3689c2bedf2e8da
parentc61606f595728a78e05d509fedac81227442bedd (diff)
[addons] Fix CPPCheck warnings for CStructHdl and DynamicCStructHdl: noExplicitConstructor, noCopyConstructor
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/AddonBase.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/AddonBase.h b/xbmc/addons/kodi-dev-kit/include/kodi/AddonBase.h
index 54119f62aa..1ff8e0a26a 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/AddonBase.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/AddonBase.h
@@ -207,14 +207,17 @@ class CStructHdl
public:
CStructHdl() : m_cStructure(new C_STRUCT()), m_owner(true) {}
- CStructHdl(const CPP_CLASS& cppClass)
+ CStructHdl(const CStructHdl& cppClass)
: m_cStructure(new C_STRUCT(*cppClass.m_cStructure)), m_owner(true)
{
}
- CStructHdl(const C_STRUCT* cStructure) : m_cStructure(new C_STRUCT(*cStructure)), m_owner(true) {}
+ explicit CStructHdl(const C_STRUCT* cStructure)
+ : m_cStructure(new C_STRUCT(*cStructure)), m_owner(true)
+ {
+ }
- CStructHdl(C_STRUCT* cStructure) : m_cStructure(cStructure) { assert(cStructure); }
+ explicit CStructHdl(C_STRUCT* cStructure) : m_cStructure(cStructure) { assert(cStructure); }
const CStructHdl& operator=(const CStructHdl& right)
{
@@ -289,19 +292,22 @@ public:
memset(m_cStructure, 0, sizeof(C_STRUCT));
}
- DynamicCStructHdl(const CPP_CLASS& cppClass)
+ DynamicCStructHdl(const DynamicCStructHdl& cppClass)
: m_cStructure(new C_STRUCT(*cppClass.m_cStructure)), m_owner(true)
{
CPP_CLASS::AllocResources(cppClass.m_cStructure, m_cStructure);
}
- DynamicCStructHdl(const C_STRUCT* cStructure)
+ explicit DynamicCStructHdl(const C_STRUCT* cStructure)
: m_cStructure(new C_STRUCT(*cStructure)), m_owner(true)
{
CPP_CLASS::AllocResources(cStructure, m_cStructure);
}
- DynamicCStructHdl(C_STRUCT* cStructure) : m_cStructure(cStructure) { assert(cStructure); }
+ explicit DynamicCStructHdl(C_STRUCT* cStructure) : m_cStructure(cStructure)
+ {
+ assert(cStructure);
+ }
const DynamicCStructHdl& operator=(const DynamicCStructHdl& right)
{