Pragma guard remaining -Wenum-conversion failures
Summary: These incorrect enum conversions constitute compile errors with Pika / Xcode 15. Pragma guard the current offenders so we can make the warning fatal again. Reviewed By: drodriguez Differential Revision: D47345669 fbshipit-source-id: bb85a93e9f48236c9f8c54d59d55a86648c1c6fd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5bbaadfa54
commit
6ae890dccd
@@ -33,7 +33,11 @@ TEST(YGNode, measure_with_measure_fn) {
|
||||
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float w, YGMeasureMode wm, float h, YGMeasureMode hm) {
|
||||
// TODO: Correctly fix enum - float conversion warning: T158155910
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wenum-float-conversion"
|
||||
return YGSize{w * wm, h / hm};
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
|
||||
ASSERT_EQ(
|
||||
@@ -58,11 +62,19 @@ TEST(YGNode, switching_measure_fn_types) {
|
||||
auto n = YGNode{};
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float, YGMeasureMode, float, YGMeasureMode, void*) {
|
||||
// TODO: Properly fix enum - float conversion warning: T158155910
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wenum-float-conversion"
|
||||
return YGSize{};
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float w, YGMeasureMode wm, float h, YGMeasureMode hm) {
|
||||
// TODO: Properly fix enum - float conversion warning: T158155910
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wenum-float-conversion"
|
||||
return YGSize{w * wm, h / hm};
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
|
||||
ASSERT_EQ(
|
||||
|
Reference in New Issue
Block a user