Skip to content

Commit 9369f13

Browse files
committed
NULL does not need to be casted, also switch to nullptr
Fixes clang build error
1 parent 2d1bcce commit 9369f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/font.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ BitmapRef ShinonomeFont::Glyph(char32_t code) {
145145
assert(glyph);
146146
size_t const width = glyph->is_full? FULL_WIDTH : HALF_WIDTH;
147147

148-
BitmapRef bm = Bitmap::Create(reinterpret_cast<void*>(NULL), width, HEIGHT, 0, DynamicFormat(8,8,0,8,0,8,0,8,0,PF::Alpha));
148+
BitmapRef bm = Bitmap::Create(nullptr, width, HEIGHT, 0, DynamicFormat(8,8,0,8,0,8,0,8,0,PF::Alpha));
149149
uint8_t* data = reinterpret_cast<uint8_t*>(bm->pixels());
150150
int pitch = bm->pitch();
151151
for(size_t y_ = 0; y_ < HEIGHT; ++y_)
@@ -194,7 +194,7 @@ BitmapRef FTFont::Glyph(char32_t glyph) {
194194
int const width = ft_bitmap.width;
195195
int const height = ft_bitmap.rows;
196196

197-
BitmapRef bm = Bitmap::Create(reinterpret_cast<void*>(NULL), width, height, 0, DynamicFormat(8,8,0,8,0,8,0,8,0,PF::Alpha));
197+
BitmapRef bm = Bitmap::Create(nullptr, width, height, 0, DynamicFormat(8,8,0,8,0,8,0,8,0,PF::Alpha));
198198
uint8_t* data = reinterpret_cast<uint8_t*>(bm->pixels());
199199
int dst_pitch = bm->pitch();
200200

0 commit comments

Comments
 (0)