diff options
author | George Hazan <ghazan@miranda.im> | 2020-08-17 16:07:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-08-17 16:07:26 +0300 |
commit | b42fea7761d968e814382fde9748e68d83d587e7 (patch) | |
tree | b84ee0866e1fa0a021cfef5eeb116b656b81a991 | |
parent | 52be24181ca0847ab6e868da65cdbcaec82322cf (diff) |
SmileyAdd: unused function removed
-rw-r--r-- | plugins/SmileyAdd/src/download.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/general.cpp | 24 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/stdafx.h | 1 |
3 files changed, 1 insertions, 26 deletions
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index e66b5ec069..1f62182890 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -132,7 +132,7 @@ void __cdecl SmileyDownloadThread(void*) CMStringW fname(dlQueue[0].fname);
if (dlQueue[0].needext) {
- fname += GetImageExt(fname);
+ fname += ProtoGetAvatarExtension(ProtoGetAvatarFileFormat(fname));
needext = true;
}
_wrename(dlQueue[0].fname.c_str(), fname.c_str());
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 9374f5e969..ce6513d5ec 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -59,30 +59,6 @@ HICON GetDefaultIcon(bool copy) return resIco;
}
-const wchar_t* GetImageExt(CMStringW &fname)
-{
- const wchar_t *ext = L"";
-
- int fileId = _wopen(fname.c_str(), O_RDONLY | _O_BINARY);
- if (fileId != -1) {
- BYTE buf[6];
-
- int bytes = _read(fileId, buf, sizeof(buf));
- if (bytes > 4) {
- if (*(unsigned short*)buf == 0xd8ff)
- ext = L"jpg";
- else if (*(unsigned short*)buf == 0x4d42)
- ext = L"bmp";
- else if (*(unsigned*)buf == 0x474e5089)
- ext = L"png";
- else if (*(unsigned*)buf == 0x38464947)
- ext = L"gif";
- }
- _close(fileId);
- }
- return ext;
-}
-
HICON ImageList_GetIconFixed(HIMAGELIST himl, INT i, UINT fStyle)
{
ICONINFO ii;
diff --git a/plugins/SmileyAdd/src/stdafx.h b/plugins/SmileyAdd/src/stdafx.h index c4d2a90015..7de275f731 100644 --- a/plugins/SmileyAdd/src/stdafx.h +++ b/plugins/SmileyAdd/src/stdafx.h @@ -124,7 +124,6 @@ int SmileyButtonPressed(WPARAM, LPARAM); // functions for general use (defined in general.cpp)
int CalculateTextHeight(HDC hdc, CHARFORMAT2 *chf);
-const wchar_t* GetImageExt(CMStringW &fname);
MCONTACT DecodeMetaContact(MCONTACT hContact);
bool IsSmileyProto(char *proto);
|