mirror of https://github.com/Chlumsky/msdfgen.git
Fix compile warnings on OSX
The following warnings were fixed: * implicit conversion of NULL constant to 'bool' * enumeration value '...' not handled in switch
This commit is contained in:
parent
8a0388dadf
commit
dc2bf4479d
|
|
@ -235,6 +235,7 @@ bool writeShapeDescription(FILE *output, const Shape &shape) {
|
|||
case MAGENTA: colorCode = 'm'; break;
|
||||
case CYAN: colorCode = 'c'; break;
|
||||
case WHITE: colorCode = 'w'; break;
|
||||
default: break;
|
||||
}
|
||||
{
|
||||
const LinearSegment *e = dynamic_cast<const LinearSegment *>(&**edge);
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ bool loadGlyph(Shape &output, FontHandle *font, int unicode, double *advance) {
|
|||
};
|
||||
|
||||
if (!font)
|
||||
return NULL;
|
||||
return false;
|
||||
FT_Error error = FT_Load_Char(font->face, unicode, FT_LOAD_NO_SCALE);
|
||||
if (error)
|
||||
return NULL;
|
||||
return false;
|
||||
output.contours.clear();
|
||||
output.inverseYAxis = false;
|
||||
if (advance)
|
||||
|
|
|
|||
8
main.cpp
8
main.cpp
|
|
@ -221,6 +221,8 @@ static const char * writeOutput(const Bitmap<T> &bitmap, const char *filename, F
|
|||
fclose(file);
|
||||
return NULL;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (format == AUTO || format == TEXT)
|
||||
|
|
@ -597,6 +599,8 @@ int main(int argc, const char * const *argv) {
|
|||
fclose(file);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Validate and normalize shape
|
||||
|
|
@ -695,6 +699,8 @@ int main(int argc, const char * const *argv) {
|
|||
generateMSDF(msdf, shape, range, scale, translate, edgeThreshold);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Save output
|
||||
|
|
@ -747,6 +753,8 @@ int main(int argc, const char * const *argv) {
|
|||
ABORT("Failed to write test render file.");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue