summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/bitmap_funcs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-26 13:45:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-26 13:45:06 +0000
commit8b81d60137c929cc50f50a53c3905e8ff313628b (patch)
tree2a9b53819c378d5f116706429e8f6b32ba998d5a /plugins/Popup/src/bitmap_funcs.cpp
parent117d64e4c8ad971cedca3c66deb169f640cfd846 (diff)
memory allocation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@3782 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/bitmap_funcs.cpp')
-rw-r--r--plugins/Popup/src/bitmap_funcs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index 8854c8178e..8e37e796ad 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -352,7 +352,7 @@ void MyBitmap::BlendColorized(MyBitmap *bmp, int x, int y, int w, int h, COLOR32
PU_DIV255(koef2g * cl * alpha),
PU_DIV255(koef2b * cl * alpha),
alpha);
-#pragma warning(pop)
+#pragma warning(pop)
// COLOR32 cl = getr(bmp->bits[int(i*ky)*bmp->width + int(j*kx)]);
// COLOR32 src = (cl > 128) ?
// rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, alpha):
@@ -419,7 +419,7 @@ void MyBitmap::DrawColorized(MyBitmap *bmp, int x, int y, int w, int h, COLOR32
PU_DIV255(koef2g * cl * alpha),
PU_DIV255(koef2b * cl * alpha),
alpha);
-#pragma warning(pop)
+#pragma warning(pop)
// bits[(i+y)*width + (j+x)] = (cl > 128) ?
// rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, geta(bmp->bits[int(i*ky)*bmp->width + int(j*kx)])):
// rgba(koef2r * cl, koef2g * cl, koef2b * cl, geta(bmp->bits[int(i*ky)*bmp->width + int(j*kx)]));
@@ -521,7 +521,7 @@ void MyBitmap::BlendPartColorized(MyBitmap *bmp, int xin, int yin, int win, int
PU_DIV255(koef2g * cl * alpha),
PU_DIV255(koef2b * cl * alpha),
alpha);
-#pragma warning(pop)
+#pragma warning(pop)
// COLOR32 cl = getr(bmp->bits[int(i*ky)*bmp->width + int(j*kx)]);
// COLOR32 src = (cl > 128) ?
// rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, alpha):
@@ -753,7 +753,7 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque)
}
HRGN hRgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount*sizeof(RECT), (LPRGNDATA)pRgnData);
- delete pRgnData;
+ delete[] pRgnData;
return hRgn;
}
@@ -938,7 +938,7 @@ bool MyBitmap::loadFromFile(const char *fn, const char *fnAlpha)
} else
{
char ext[5];
- memcpy(ext,fn+(strlen(fn)-4),5);
+ memcpy(ext,fn+(strlen(fn)-4),5);
if (!lstrcmpiA(ext,".png"))
{
return loadFromFile_png(fn, fnAlpha);