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 MAGENTA: colorCode = 'm'; break;
|
||||||
case CYAN: colorCode = 'c'; break;
|
case CYAN: colorCode = 'c'; break;
|
||||||
case WHITE: colorCode = 'w'; break;
|
case WHITE: colorCode = 'w'; break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const LinearSegment *e = dynamic_cast<const LinearSegment *>(&**edge);
|
const LinearSegment *e = dynamic_cast<const LinearSegment *>(&**edge);
|
||||||
|
|
|
||||||
|
|
@ -94,10 +94,10 @@ bool loadGlyph(Shape &output, FontHandle *font, int unicode, double *advance) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!font)
|
if (!font)
|
||||||
return NULL;
|
return false;
|
||||||
FT_Error error = FT_Load_Char(font->face, unicode, FT_LOAD_NO_SCALE);
|
FT_Error error = FT_Load_Char(font->face, unicode, FT_LOAD_NO_SCALE);
|
||||||
if (error)
|
if (error)
|
||||||
return NULL;
|
return false;
|
||||||
output.contours.clear();
|
output.contours.clear();
|
||||||
output.inverseYAxis = false;
|
output.inverseYAxis = false;
|
||||||
if (advance)
|
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);
|
fclose(file);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (format == AUTO || format == TEXT)
|
if (format == AUTO || format == TEXT)
|
||||||
|
|
@ -597,6 +599,8 @@ int main(int argc, const char * const *argv) {
|
||||||
fclose(file);
|
fclose(file);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate and normalize shape
|
// Validate and normalize shape
|
||||||
|
|
@ -695,6 +699,8 @@ int main(int argc, const char * const *argv) {
|
||||||
generateMSDF(msdf, shape, range, scale, translate, edgeThreshold);
|
generateMSDF(msdf, shape, range, scale, translate, edgeThreshold);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save output
|
// Save output
|
||||||
|
|
@ -747,6 +753,8 @@ int main(int argc, const char * const *argv) {
|
||||||
ABORT("Failed to write test render file.");
|
ABORT("Failed to write test render file.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue