public:\r
// typedef T _PtrClass;\r
CMyComPtr() { _p = NULL;}\r
- CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); }\r
- CMyComPtr(const CMyComPtr<T>& lp)\r
+ explicit CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); }\r
+ explicit CMyComPtr(const CMyComPtr<T>& lp)\r
{\r
if ((_p = lp._p) != NULL)\r
_p->AddRef();\r
public:\r
BSTR m_str;\r
CMyComBSTR(): m_str(NULL) {}\r
- CMyComBSTR(LPCOLESTR src) { m_str = ::SysAllocString(src); }\r
+ explicit CMyComBSTR(LPCOLESTR src) { m_str = ::SysAllocString(src); }\r
// Move constructor\r
explicit CMyComBSTR(BSTR *bstr): m_str(*bstr) { *bstr = NULL; }\r
// CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); }\r
const CLIPFORMAT cf;\r
public:\r
operator CLIPFORMAT() const { return cf; }\r
- CMyClipFormat(CLIPFORMAT cf) : cf(cf) { }\r
- CMyClipFormat(LPCTSTR cfstr) : cf(RegisterClipboardFormat(cfstr)) { }\r
+ explicit CMyClipFormat(CLIPFORMAT cf) : cf(cf) { }\r
+ explicit CMyClipFormat(LPCTSTR cfstr) : cf(RegisterClipboardFormat(cfstr)) { }\r
};\r
\r
class CMyFormatEtc : public FORMATETC\r
public:\r
CMyVariant() { VariantInit(this); }\r
~CMyVariant() { VariantClear(this); }\r
- CMyVariant(short value)\r
+ explicit CMyVariant(short value)\r
{\r
V_VT(this) = VT_I2;\r
V_I2(this) = value;\r
}\r
- CMyVariant(long value)\r
+ explicit CMyVariant(long value)\r
{\r
V_VT(this) = VT_I4;\r
V_I4(this) = value;\r
}\r
- CMyVariant(bool value)\r
+ explicit CMyVariant(bool value)\r
{\r
V_VT(this) = VT_BOOL;\r
V_BOOL(this) = value ? VARIANT_TRUE : VARIANT_FALSE;\r
}\r
- CMyVariant(LPCOLESTR value)\r
+ explicit CMyVariant(LPCOLESTR value)\r
{\r
V_VT(this) = VT_BSTR;\r
V_BSTR(this) = SysAllocString(value);\r
}\r
- CMyVariant(LPCOLESTR value, UINT len)\r
+ explicit CMyVariant(LPCOLESTR value, UINT len)\r
{\r
V_VT(this) = VT_BSTR;\r
V_BSTR(this) = SysAllocStringLen(value, len);\r
}\r
- CMyVariant(IDispatch *value)\r
+ explicit CMyVariant(IDispatch *value)\r
{\r
V_VT(this) = VT_DISPATCH;\r
V_DISPATCH(this) = value;\r
if (value)\r
value->AddRef();\r
}\r
- CMyVariant(const CMyVariant &src)\r
+ explicit CMyVariant(const CMyVariant &src)\r
{\r
VariantInit(this);\r
#if _MSC_VER < 1500 \r
struct DirViewFilterSettings
{
template<class GetOptionBool>
- DirViewFilterSettings(GetOptionBool getoptbool)
+ explicit DirViewFilterSettings(GetOptionBool getoptbool)
{
show_skipped = getoptbool(OPT_SHOW_SKIPPED);
show_unique_left = getoptbool(OPT_SHOW_UNIQUE_LEFT);
struct ContentsChangedException
{
- ContentsChangedException(const String& failpath);
+ explicit ContentsChangedException(const String& failpath);
String m_msg;
};