From 62a186697df33c96dc1a6dac0f4dfc38652fb96f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 16:39:04 +0300 Subject: BYTE -> uint8_t --- plugins/HistoryStats/src/bandctrlimpl.cpp | 6 +++--- plugins/HistoryStats/src/canvas.cpp | 6 +++--- plugins/HistoryStats/src/canvas.h | 2 +- plugins/HistoryStats/src/main.cpp | 4 ++-- plugins/HistoryStats/src/utils.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/HistoryStats/src') diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp index f0553dd4c6..f9f953fcc3 100644 --- a/plugins/HistoryStats/src/bandctrlimpl.cpp +++ b/plugins/HistoryStats/src/bandctrlimpl.cpp @@ -424,15 +424,15 @@ HICON BandCtrlImpl::convertToGray(HICON hIcon) BITMAP bmp; if (GetObject(ii.hbmColor, sizeof(bmp), &bmp) && bmp.bmBitsPixel == 32) { int nSize = bmp.bmHeight * bmp.bmWidthBytes; - BYTE* pBits = new BYTE[nSize]; + uint8_t* pBits = new uint8_t[nSize]; if (GetBitmapBits(ii.hbmColor, nSize, pBits)) { for (int y = 0; y < bmp.bmHeight; ++y) { - BYTE* pLine = pBits + y * bmp.bmWidthBytes; + uint8_t* pLine = pBits + y * bmp.bmWidthBytes; for (int x = 0; x < bmp.bmWidth; ++x) { DWORD color = reinterpret_cast(pLine)[x]; - BYTE gray = (77 * GetBValue(color) + 150 * GetGValue(color) + 28 * GetRValue(color)) / 255; + uint8_t gray = (77 * GetBValue(color) + 150 * GetGValue(color) + 28 * GetRValue(color)) / 255; color = (color & 0xFF000000) | RGB(gray, gray, gray); diff --git a/plugins/HistoryStats/src/canvas.cpp b/plugins/HistoryStats/src/canvas.cpp index b85cca45fc..b64ffab679 100644 --- a/plugins/HistoryStats/src/canvas.cpp +++ b/plugins/HistoryStats/src/canvas.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "canvas.h" -void Canvas::updateTrans(BYTE* pData) +void Canvas::updateTrans(uint8_t* pData) { // MEMO: this follwing transparency code only makes sense for m_nChannels == 4 assert(m_nChannels == 4); @@ -87,7 +87,7 @@ HDC Canvas::beginDraw() m_pBMIH->biClrUsed = 0; m_pBMIH->biClrImportant = 0; - BYTE* pData = nullptr; + uint8_t* pData = nullptr; m_hDC = CreateCompatibleDC(nullptr); m_hBmp = CreateDIBSection(m_hDC, reinterpret_cast(m_pBMIH), DIB_RGB_COLORS, reinterpret_cast(&pData), nullptr, 0); @@ -112,7 +112,7 @@ bool Canvas::getDigest(Digest& digest) // read data from DIB int nSize = m_nLineLength * m_nHeight; - BYTE* pData = new BYTE[nSize]; + uint8_t* pData = new uint8_t[nSize]; memset(pData, 0, nSize); diff --git a/plugins/HistoryStats/src/canvas.h b/plugins/HistoryStats/src/canvas.h index 99213316f2..d1857d1c33 100644 --- a/plugins/HistoryStats/src/canvas.h +++ b/plugins/HistoryStats/src/canvas.h @@ -35,7 +35,7 @@ private: HGDIOBJ m_hOldBmp; private: - void updateTrans(BYTE* pData); + void updateTrans(uint8_t* pData); public: explicit Canvas(int nWidth, int nHeight); diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index a3fc660c42..d871dff4c9 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -221,7 +221,7 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam) memset(&dbe, 0, sizeof(dbe)); dbe.cbSize = sizeof(dbe); - dbe.pBlob = reinterpret_cast(malloc(blobBuffer)); + dbe.pBlob = reinterpret_cast(malloc(blobBuffer)); while (hEvent) { @@ -230,7 +230,7 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam) if (blobBuffer < dbe.cbBlob) { blobBuffer = 4096 * ((4095 + dbe.cbBlob) / 4096); - dbe.pBlob = reinterpret_cast(realloc(dbe.pBlob, blobBuffer)); + dbe.pBlob = reinterpret_cast(realloc(dbe.pBlob, blobBuffer)); } if (db_event_get(hEvent, &dbe) == 0) { diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp index aa656e11cb..71a7f78de3 100644 --- a/plugins/HistoryStats/src/utils.cpp +++ b/plugins/HistoryStats/src/utils.cpp @@ -829,7 +829,7 @@ ext::string utils::getGUID() upto_each_(i, sizeof(guid)) { - BYTE val = reinterpret_cast(&guid)[i]; + uint8_t val = reinterpret_cast(&guid)[i]; strGUID[2 * i] = hexDigits[(val >> 4) & 0xF]; strGUID[2 * i + 1] = hexDigits[val & 0xF]; -- cgit v1.2.3