summaryrefslogtreecommitdiff
path: root/plugins/SplashScreen/src/bitmap_funcs.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/SplashScreen/src/bitmap_funcs.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/SplashScreen/src/bitmap_funcs.cpp')
-rw-r--r--plugins/SplashScreen/src/bitmap_funcs.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp
index 0c45210801..b5d1738832 100644
--- a/plugins/SplashScreen/src/bitmap_funcs.cpp
+++ b/plugins/SplashScreen/src/bitmap_funcs.cpp
@@ -21,30 +21,30 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
MyBitmap::MyBitmap()
{
- dcBmp = 0;
- hBmp = 0;
- bits = 0;
+ dcBmp = nullptr;
+ hBmp = nullptr;
+ bits = nullptr;
width = height = 0;
- bitsSave = 0;
+ bitsSave = nullptr;
}
MyBitmap::MyBitmap(int w, int h)
{
- dcBmp = 0;
- hBmp = 0;
- bits = 0;
+ dcBmp = nullptr;
+ hBmp = nullptr;
+ bits = nullptr;
width = height = 0;
- bitsSave = 0;
+ bitsSave = nullptr;
allocate(w, h);
}
MyBitmap::MyBitmap(wchar_t *fn)
{
- dcBmp = 0;
- hBmp = 0;
- bits = 0;
+ dcBmp = nullptr;
+ hBmp = nullptr;
+ bits = nullptr;
width = height = 0;
- bitsSave = 0;
+ bitsSave = nullptr;
loadFromFile(fn);
}
@@ -115,7 +115,7 @@ void MyBitmap::restoreAlpha(int x, int y, int w, int h)
}
delete[] bitsSave;
- bitsSave = 0;
+ bitsSave = nullptr;
}
void MyBitmap::DrawText(wchar_t *str, int x, int y)
@@ -140,10 +140,10 @@ bool MyBitmap::loadFromFile(wchar_t *fn)
}
BITMAP bm; GetObject(hBmpLoaded, sizeof(bm), &bm);
- SetBitmapDimensionEx(hBmpLoaded, bm.bmWidth, bm.bmHeight, NULL);
+ SetBitmapDimensionEx(hBmpLoaded, bm.bmWidth, bm.bmHeight, nullptr);
SIZE sz;
- HDC dcTmp = CreateCompatibleDC(0);
+ HDC dcTmp = CreateCompatibleDC(nullptr);
GetBitmapDimensionEx(hBmpLoaded, &sz);
HBITMAP hBmpDcSave = (HBITMAP)SelectObject(dcTmp, hBmpLoaded);
@@ -180,8 +180,8 @@ void MyBitmap::allocate(int w, int h)
DeleteDC(dcBmp);
}
- hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void**)&bits, 0, 0);
- dcBmp = CreateCompatibleDC(0);
+ hBmp = (HBITMAP)CreateDIBSection(nullptr, &bi, DIB_RGB_COLORS, (void**)&bits, nullptr, 0);
+ dcBmp = CreateCompatibleDC(nullptr);
hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmp);
}
@@ -190,9 +190,9 @@ void MyBitmap::free()
DeleteObject(SelectObject(dcBmp, hBmpSave));
DeleteDC(dcBmp);
- dcBmp = 0;
- hBmp = 0;
- bits = 0;
+ dcBmp = nullptr;
+ hBmp = nullptr;
+ bits = nullptr;
width = height = 0;
}