summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/rowheight_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/Clist_nicer/src/rowheight_funcs.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Clist_nicer/src/rowheight_funcs.cpp')
-rw-r--r--plugins/Clist_nicer/src/rowheight_funcs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Clist_nicer/src/rowheight_funcs.cpp b/plugins/Clist_nicer/src/rowheight_funcs.cpp
index 95f1907c5d..e916ac3b74 100644
--- a/plugins/Clist_nicer/src/rowheight_funcs.cpp
+++ b/plugins/Clist_nicer/src/rowheight_funcs.cpp
@@ -30,16 +30,16 @@ BOOL RowHeight::Init(ClcData *dat)
dat->rowHeight = 0;
dat->row_heights_size = 0;
dat->row_heights_allocated = 0;
- dat->row_heights = NULL;
+ dat->row_heights = nullptr;
return TRUE;
}
void RowHeight::Free(ClcData *dat)
{
- if (dat->row_heights != NULL) {
+ if (dat->row_heights != nullptr) {
free(dat->row_heights);
- dat->row_heights = NULL;
+ dat->row_heights = nullptr;
}
dat->row_heights_allocated = 0;
@@ -60,10 +60,10 @@ BOOL RowHeight::Alloc(ClcData *dat, int size)
size_grow += 100 - (size_grow % 100);
- if (dat->row_heights != NULL) {
+ if (dat->row_heights != nullptr) {
int *tmp = (int *)realloc((void *)dat->row_heights, sizeof(int) * size_grow);
- if (tmp == NULL) {
+ if (tmp == nullptr) {
Free(dat);
return FALSE;
}
@@ -73,7 +73,7 @@ BOOL RowHeight::Alloc(ClcData *dat, int size)
else {
dat->row_heights = (int *)malloc(sizeof(int) * size_grow);
- if (dat->row_heights == NULL) {
+ if (dat->row_heights == nullptr) {
Free(dat);
return FALSE;
}
@@ -141,7 +141,7 @@ void RowHeight::calcRowHeights(ClcData *dat, HWND hwnd)
while (true) {
if (group->scanIndex == group->cl.getCount()) {
group = group->parent;
- if (group == NULL) break; // Finished list
+ if (group == nullptr) break; // Finished list
group->scanIndex++;
continue;
}
@@ -216,7 +216,7 @@ int RowHeight::hitTest(ClcData *dat, int pos_y)
int RowHeight::getHeight(ClcData *dat, int item)
{
- if (dat->row_heights == 0)
+ if (dat->row_heights == nullptr)
return 0;
return dat->row_heights[item];