summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
commit62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch)
tree1437d0906218fae8827aed384026f2b7e656f4ac /plugins/HistoryStats
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'plugins/HistoryStats')
-rw-r--r--plugins/HistoryStats/src/bandctrlimpl.cpp6
-rw-r--r--plugins/HistoryStats/src/canvas.cpp6
-rw-r--r--plugins/HistoryStats/src/canvas.h2
-rw-r--r--plugins/HistoryStats/src/main.cpp4
-rw-r--r--plugins/HistoryStats/src/utils.cpp2
5 files changed, 10 insertions, 10 deletions
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<DWORD*>(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<BITMAPINFO*>(m_pBMIH), DIB_RGB_COLORS, reinterpret_cast<void**>(&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<BYTE*>(malloc(blobBuffer));
+ dbe.pBlob = reinterpret_cast<uint8_t*>(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<BYTE*>(realloc(dbe.pBlob, blobBuffer));
+ dbe.pBlob = reinterpret_cast<uint8_t*>(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<BYTE*>(&guid)[i];
+ uint8_t val = reinterpret_cast<uint8_t*>(&guid)[i];
strGUID[2 * i] = hexDigits[(val >> 4) & 0xF];
strGUID[2 * i + 1] = hexDigits[val & 0xF];