diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
commit | 1039b2829a264280493ba0fa979214fe024dc70c (patch) | |
tree | 8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/AVS/src | |
parent | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff) |
WORD -> uint16_t
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r-- | plugins/AVS/src/acc.cpp | 8 | ||||
-rw-r--r-- | plugins/AVS/src/image_utils.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index bc65051d2d..e6ede21b3c 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -85,11 +85,11 @@ BOOL AnimatedGifGetData(ACCData *data) FITAG *tag = nullptr;
if (!FreeImage_GetMetadata(FIMD_ANIMATION, page, "LogicalWidth", &tag))
goto ERR;
- data->ag.logicalWidth = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.logicalWidth = *(uint16_t *)FreeImage_GetTagValue(tag);
if (!FreeImage_GetMetadata(FIMD_ANIMATION, page, "LogicalHeight", &tag))
goto ERR;
- data->ag.logicalHeight = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.logicalHeight = *(uint16_t *)FreeImage_GetTagValue(tag);
if (!FreeImage_GetMetadata(FIMD_ANIMATION, page, "Loop", &tag))
goto ERR;
@@ -135,12 +135,12 @@ void AnimatedGifMountFrame(ACCData* data, int page) FITAG *tag = nullptr;
if (FreeImage_GetMetadata(FIMD_ANIMATION, dib, "FrameLeft", &tag))
- data->ag.frame.left = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.frame.left = *(uint16_t *)FreeImage_GetTagValue(tag);
else
data->ag.frame.left = 0;
if (FreeImage_GetMetadata(FIMD_ANIMATION, dib, "FrameTop", &tag))
- data->ag.frame.top = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.frame.top = *(uint16_t *)FreeImage_GetTagValue(tag);
else
data->ag.frame.top = 0;
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index 3783f2ab3a..a43177ad9b 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -270,7 +270,7 @@ DWORD GetImgHash(HBITMAP hBitmap) GetObject(hBitmap, sizeof(bmp), &bmp);
DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
- WORD *p = (WORD *)malloc(dwLen);
+ uint16_t *p = (uint16_t *)malloc(dwLen);
if (p == nullptr)
return 0;
memset(p, 0, dwLen);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index f75005773b..76387ce72f 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -221,8 +221,8 @@ static INT_PTR CALLBACK DlgProcOptionsAvatars(HWND hwndDlg, UINT msg, WPARAM wPa g_plugin.setByte("MakeGrayscale", IsDlgButtonChecked(hwndDlg, IDC_MAKE_GRAYSCALE) ? 1 : 0); g_plugin.setByte("MakeTransparentBkg", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSPARENT_BKG) ? 1 : 0); g_plugin.setByte("MakeTransparencyProportionalToColorDiff", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSP_PROPORTIONAL) ? 1 : 0); - g_plugin.setWord("TranspBkgNumPoints", (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0)); - g_plugin.setWord("TranspBkgColorDiff", (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0)); + g_plugin.setWord("TranspBkgNumPoints", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0)); + g_plugin.setWord("TranspBkgColorDiff", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0)); } } break; @@ -452,13 +452,13 @@ static void SaveTransparentData(HWND hwndDlg, MCONTACT hContact) else db_set_b(hContact, "ContactPhoto", "MakeTransparentBkg", transp); - WORD tmp = (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0); + uint16_t tmp = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0); if (g_plugin.getWord("TranspBkgNumPoints", 5) == tmp) db_unset(hContact, "ContactPhoto", "TranspBkgNumPoints"); else db_set_w(hContact, "ContactPhoto", "TranspBkgNumPoints", tmp); - tmp = (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0); + tmp = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0); if (g_plugin.getWord("TranspBkgColorDiff", 10) == tmp) db_unset(hContact, "ContactPhoto", "TranspBkgColorDiff"); else |