summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/images.h
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-10-02 14:41:59 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-10-02 14:41:59 +0000
commit030ba2d4e3a9eeeb395b517c1e103912d1d3b0b1 (patch)
treedade4900fc9d36141a122b75d11e0a603341c7dc /plugins/Toaster/src/images.h
parentd798d3bd532abf0fc9db8cd73c892303353fcf08 (diff)
Toaster: warnings fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@15484 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/images.h')
-rw-r--r--plugins/Toaster/src/images.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/Toaster/src/images.h b/plugins/Toaster/src/images.h
index 31981f82a5..320a368769 100644
--- a/plugins/Toaster/src/images.h
+++ b/plugins/Toaster/src/images.h
@@ -6,34 +6,31 @@ class ToasterImage
ptrT tszId;
public:
- ToasterImage(HICON hIcon)
+ __inline explicit ToasterImage(HICON hIcon) : tszId(CMString(FORMAT, _T("%p"), hIcon).Detach())
{
- ICONINFO icon;
+ ICONINFO icon = { 0 };
if (GetIconInfo(hIcon, &icon))
{
_hBitmap = icon.hbmColor;
DeleteObject(icon.hbmMask);
}
- tszId = CMString(FORMAT, _T("%p"), hIcon).Detach();
}
- inline ToasterImage(HBITMAP bmp) : _hBitmap(bmp)
- {
- tszId = CMString(FORMAT, _T("%p"), bmp).Detach();
+ __inline explicit ToasterImage(HBITMAP bmp) : _hBitmap(bmp), tszId(CMString(FORMAT, _T("%p"), bmp).Detach())
+ {
}
- ToasterImage(const char *szProto)
+ __inline explicit ToasterImage(const char *szProto) : tszId(mir_a2t(szProto))
{
- ICONINFO icon;
+ ICONINFO icon = { 0 };
if (GetIconInfo(Skin_LoadProtoIcon(szProto, ID_STATUS_ONLINE, 1), &icon))
{
_hBitmap = icon.hbmColor;
DeleteObject(icon.hbmMask);
}
- tszId = mir_a2t(szProto);
}
- inline ~ToasterImage()
+ __inline ~ToasterImage()
{
DeleteObject(_hBitmap);
}
@@ -62,7 +59,7 @@ public:
return mir_wstrdup(wszSavePath);
}
- inline operator wchar_t*()
+ __inline operator wchar_t*()
{ return Save();
}
}; \ No newline at end of file