diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-17 18:47:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-17 18:47:56 +0000 |
commit | 5a4b552c804aea6514cafad1bdc837c4a798f55b (patch) | |
tree | 5eb9abe62eb322884c88da3d997d4edf65fb6c5f /plugins/FloatingContacts/src/bitmap_funcs.cpp | |
parent | 87cf440e889e5dbaa1a85be9e7b2560aa636ac1d (diff) |
- explicit windows destruction on exit;
- code cleaning
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@6114 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FloatingContacts/src/bitmap_funcs.cpp')
-rw-r--r-- | plugins/FloatingContacts/src/bitmap_funcs.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index 6a9f31ee45..d176ebc159 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -1053,7 +1053,7 @@ bool MyBitmap::loadFromFile_png(const char *fn, const char *fnAlpha) BYTE *pDibBits;
if ((hFile = CreateFileA(fn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE)
if ((hMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != NULL)
- if ((ppMap = (BYTE*)MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0 )) != NULL)
+ if ((ppMap = (BYTE*)MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0)) != NULL)
cbFileSize = GetFileSize(hFile, NULL);
if (cbFileSize)
{
@@ -1096,10 +1096,10 @@ bool MyBitmap::loadFromFile_png(const char *fn, const char *fnAlpha) BYTE *p1 = (BYTE *)bits + (bi->bmiHeader.biHeight-y-1)*bi->bmiHeader.biWidth*4;
for (int x = 0; x<bi->bmiHeader.biWidth; ++x)
{
- p1[0] = p2[0];
- p1[1] = p2[1];
- p1[2] = p2[2];
- p1[3] = p2[3];
+ p1[0] = p2[0];
+ p1[1] = p2[1];
+ p1[2] = p2[2];
+ p1[3] = p2[3];
p1 += 4;
p2 += 4;
}
@@ -1143,7 +1143,7 @@ bool MyBitmap::loadFromFile_default(const char *fn, const char *fnAlpha) (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
- bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
+ bits[i] = (bits[i] & 0x00ffffff) | ((alpha.bits[i] & 0x000000ff) << 24 );
premultipleChannels();
} else
{
|