From 82a3bbaf034bc286665465d8904e6d1db52e5eb4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 8 Jan 2017 20:59:11 +0300 Subject: code cleaning --- plugins/AVS/src/acc.cpp | 6 +++--- plugins/AVS/src/cache.cpp | 6 +++--- plugins/AVS/src/options.cpp | 2 +- plugins/AVS/src/stdafx.h | 10 +++++----- plugins/AVS/src/utils.cpp | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/AVS') diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index f24d1e6680..30dcc47720 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -496,11 +496,11 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP int *height = (int*)lParam; // Get avatar - avatarCacheEntry *ace; + AVATARCACHEENTRY *ace; if (data->hContact == NULL) - ace = (avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)data->proto); + ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)data->proto); else - ace = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)data->hContact, 0); + ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)data->hContact, 0); if (ace == NULL || ace->bmHeight == 0 || ace->bmWidth == 0 || (data->respectHidden && (ace->dwFlags & AVS_HIDEONCLIST))) { *width = 0; diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index 6bd8f97177..18250bddd7 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -75,7 +75,7 @@ CacheNode* FindAvatarInCache(MCONTACT hContact, bool add, bool findAny) if (szProto == NULL || !db_get_b(NULL, AVS_MODULE, szProto, 1)) return NULL; - avatarCacheEntry tmp; + AVATARCACHEENTRY tmp; tmp.hContact = hContact; mir_cslock lck(cachecs); @@ -167,7 +167,7 @@ void DeleteAvatarFromCache(MCONTACT hContact, bool bForever) if (g_shutDown) return; - avatarCacheEntry tmp; + AVATARCACHEENTRY tmp; tmp.hContact = GetContactThatHaveTheAvatar(hContact); mir_cslock lck(cachecs); @@ -193,7 +193,7 @@ int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode) if (g_shutDown) return 0; - avatarCacheEntry tmp; + AVATARCACHEENTRY tmp; tmp.hContact = hContact; mir_cslock lck(cachecs); diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index e83ceb28e1..48475ff1ad 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -164,7 +164,7 @@ static void SetProtoPic(char *szProto) if (!mir_strcmp(p.szProtoname, szProto) && mir_strlen(p.szProtoname) == mir_strlen(szProto)) { if (p.hbmPic != 0) DeleteObject(p.hbmPic); - memset(&p, 0, sizeof(avatarCacheEntry)); + memset(&p, 0, sizeof(AVATARCACHEENTRY)); CreateAvatarInCache(0, &p, szProto); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); break; diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h index a28ea994c6..4eb907d41e 100644 --- a/plugins/AVS/src/stdafx.h +++ b/plugins/AVS/src/stdafx.h @@ -64,7 +64,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -struct CacheNode : public avatarCacheEntry, public MZeroedObject +struct CacheNode : public AVATARCACHEENTRY, public MZeroedObject { CacheNode(); ~CacheNode(); @@ -76,8 +76,8 @@ struct CacheNode : public avatarCacheEntry, public MZeroedObject void wipeInfo(); }; -// The same fields as avatarCacheEntry + proto name -struct protoPicCacheEntry : public avatarCacheEntry, public MZeroedObject +// The same fields as AVATARCACHEENTRY + proto name +struct protoPicCacheEntry : public AVATARCACHEENTRY, public MZeroedObject { protoPicCacheEntry() { memset(this, 0, sizeof(*this)); }; ~protoPicCacheEntry(); @@ -126,10 +126,10 @@ void MakePathRelative(MCONTACT hContact); void MakePathRelative(MCONTACT hContact, wchar_t *dest); void MyPathToAbsolute(const wchar_t *ptszPath, wchar_t *ptszDest); -HBITMAP LoadPNG(struct avatarCacheEntry *ace, char *szFilename); +HBITMAP LoadPNG(struct AVATARCACHEENTRY *ace, char *szFilename); void UnloadCache(void); -int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto); +int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, char *szProto); void DeleteAvatarFromCache(MCONTACT hContact, bool bForever); void PicLoader(LPVOID param); void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY*)-1); diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index a47b3f15c1..a20372b9dc 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -65,7 +65,7 @@ void MakePathRelative(MCONTACT hContact) // create the avatar in cache // returns 0 if not created (no avatar), iIndex otherwise, -2 if has to request avatar, -3 if avatar too big -int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) +int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, char *szProto) { ptrW tszValue; wchar_t tszFilename[MAX_PATH]; tszFilename[0] = 0; @@ -157,7 +157,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) BITMAP bminfo; GetObject(ace->hbmPic, sizeof(bminfo), &bminfo); - ace->cbSize = sizeof(avatarCacheEntry); + ace->cbSize = sizeof(AVATARCACHEENTRY); ace->dwFlags = AVS_BITMAP_VALID; if (hContact != NULL && db_get_b(hContact, "ContactPhoto", "Hidden", 0)) ace->dwFlags |= AVS_HIDEONCLIST; @@ -280,7 +280,7 @@ void protoPicCacheEntry::clear() if (hbmPic != 0) DeleteObject(hbmPic); - memset(this, 0, sizeof(avatarCacheEntry)); + memset(this, 0, sizeof(AVATARCACHEENTRY)); } /////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3