mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Remove floating point as bool warning.
This commit is contained in:
parent
7b173d7f08
commit
83cd92cb9f
@ -2561,6 +2561,9 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_FLOAT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
|
||||||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||||
GCC_ENABLE_CPP_RTTI = NO;
|
GCC_ENABLE_CPP_RTTI = NO;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
@ -2576,6 +2579,8 @@
|
|||||||
NO_MSABI_VA_FUNCS,
|
NO_MSABI_VA_FUNCS,
|
||||||
DISABLE_PRINTLIB,
|
DISABLE_PRINTLIB,
|
||||||
);
|
);
|
||||||
|
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
|
||||||
|
GCC_WARN_SHADOW = YES;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
$PROJECT_DIR/../../Build/Clover/DEBUG_XCODE8/X64/rEFIt_UEFI/refit/DEBUG,
|
$PROJECT_DIR/../../Build/Clover/DEBUG_XCODE8/X64/rEFIt_UEFI/refit/DEBUG,
|
||||||
$PROJECT_DIR/../../rEFIt_UEFI/Platform/Posix,
|
$PROJECT_DIR/../../rEFIt_UEFI/Platform/Posix,
|
||||||
@ -2620,9 +2625,14 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_FLOAT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||||
GCC_ENABLE_CPP_RTTI = NO;
|
GCC_ENABLE_CPP_RTTI = NO;
|
||||||
|
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
|
||||||
|
GCC_WARN_SHADOW = YES;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
$PROJECT_DIR/../../Build/Clover/DEBUG_XCODE8/X64/rEFIt_UEFI/refit/DEBUG,
|
$PROJECT_DIR/../../Build/Clover/DEBUG_XCODE8/X64/rEFIt_UEFI/refit/DEBUG,
|
||||||
$PROJECT_DIR/../../rEFIt_UEFI/Platform/Posix,
|
$PROJECT_DIR/../../rEFIt_UEFI/Platform/Posix,
|
||||||
@ -3014,7 +3024,6 @@
|
|||||||
CLANG_CXX_LIBRARY = "compiler-default";
|
CLANG_CXX_LIBRARY = "compiler-default";
|
||||||
CLANG_ENABLE_OBJC_ARC = NO;
|
CLANG_ENABLE_OBJC_ARC = NO;
|
||||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
@ -3075,7 +3084,6 @@
|
|||||||
CLANG_CXX_LIBRARY = "compiler-default";
|
CLANG_CXX_LIBRARY = "compiler-default";
|
||||||
CLANG_ENABLE_OBJC_ARC = NO;
|
CLANG_ENABLE_OBJC_ARC = NO;
|
||||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
@ -278,7 +278,7 @@ EFI_STATUS ParseSVGIcon(NSVGparser *p, INTN Id, CONST CHAR8 *IconName, float Sc
|
|||||||
//there is bounds after nsvgParse()
|
//there is bounds after nsvgParse()
|
||||||
IconImage->width = shape->bounds[2] - shape->bounds[0];
|
IconImage->width = shape->bounds[2] - shape->bounds[0];
|
||||||
IconImage->height = shape->bounds[3] - shape->bounds[1];
|
IconImage->height = shape->bounds[3] - shape->bounds[1];
|
||||||
if (!IconImage->height) {
|
if ( IconImage->height == 0 ) { // doing "if (!IconImage->height)" generates a warning
|
||||||
IconImage->height = 200;
|
IconImage->height = 200;
|
||||||
}
|
}
|
||||||
// if (Id == BUILTIN_ICON_BACKGROUND || Id == BUILTIN_ICON_BANNER) {
|
// if (Id == BUILTIN_ICON_BACKGROUND || Id == BUILTIN_ICON_BANNER) {
|
||||||
@ -903,14 +903,14 @@ INTN renderSVGtext(EG_IMAGE* TextBufferXY, INTN posX, INTN posY, INTN textType,
|
|||||||
|
|
||||||
// Height = 180; //for test
|
// Height = 180; //for test
|
||||||
// DBG("textBuffer: [%d,%d], fontUnits=%d\n", Width, TextBufferXY->Height, (int)fontSVG->unitsPerEm);
|
// DBG("textBuffer: [%d,%d], fontUnits=%d\n", Width, TextBufferXY->Height, (int)fontSVG->unitsPerEm);
|
||||||
if (!fontSVG->unitsPerEm) {
|
if ( fontSVG->unitsPerEm == 0 ) { // doing "if (!fontSVG->unitsPerEm)" generates a warning
|
||||||
fontSVG->unitsPerEm = 1000.f;
|
fontSVG->unitsPerEm = 1000.f;
|
||||||
}
|
}
|
||||||
float fH = fontSVG->bbox[3] - fontSVG->bbox[1]; //1250
|
float fH = fontSVG->bbox[3] - fontSVG->bbox[1]; //1250
|
||||||
if (fH == 0.f) {
|
if (fH == 0.f) {
|
||||||
DBG("wrong font: %f\n", fontSVG->unitsPerEm);
|
DBG("wrong font: %f\n", fontSVG->unitsPerEm);
|
||||||
DumpFloat2("Font bbox", fontSVG->bbox, 4);
|
DumpFloat2("Font bbox", fontSVG->bbox, 4);
|
||||||
fH = fontSVG->unitsPerEm?fontSVG->unitsPerEm:1000.0f; //1000
|
fH = fontSVG->unitsPerEm != 0 ? fontSVG->unitsPerEm : 1000.0f; //1000 // using "fontSVG->unitsPerEm != 0" instead of just is to avoid a warning
|
||||||
}
|
}
|
||||||
sy = (float)Height / fH; //(float)fontSVG->unitsPerEm; // 260./1250.
|
sy = (float)Height / fH; //(float)fontSVG->unitsPerEm; // 260./1250.
|
||||||
//in font units
|
//in font units
|
||||||
|
@ -4050,7 +4050,7 @@ float addLetter(NSVGparser* p, CHAR16 letter, float x, float y, float scale, UIN
|
|||||||
DBG("font absent\n");
|
DBG("font absent\n");
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
if (!scale) {
|
if ( scale == 0 ) { // doing "if (!scale)" generates a warning
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user