Skip to content

Commit

Permalink
NULL does not need to be casted, also switch to nullptr
Browse files Browse the repository at this point in the history
Fixes clang build error
  • Loading branch information
AMDmi3 committed Aug 23, 2016
1 parent 2d1bcce commit 9369f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/font.cpp
Expand Up @@ -145,7 +145,7 @@ BitmapRef ShinonomeFont::Glyph(char32_t code) {
assert(glyph);
size_t const width = glyph->is_full? FULL_WIDTH : HALF_WIDTH;

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

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

Expand Down

0 comments on commit 9369f13

Please sign in to comment.