Skip to content

Commit 0e5d914

Browse files
Fix ClipPath Android build: add missing std headers and switch defaults
1 parent b3e68e0 commit 0e5d914

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎packages/react-native/ReactCommon/react/renderer/components/view/ClipPathPropsConversions.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ GeometryBox convertCSSGeometryBox(CSSGeometryBox cssBox) {
4545
return GeometryBox::StrokeBox;
4646
case CSSGeometryBox::ViewBox:
4747
return GeometryBox::ViewBox;
48+
default:
49+
LOG(ERROR) << "Unexpected CSSGeometryBox value: "
50+
<< static_cast<int>(cssBox);
51+
return GeometryBox::BorderBox;
4852
}
4953
}
5054

‎packages/react-native/ReactCommon/react/renderer/graphics/ClipPath.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "ClipPath.h"
99

1010
#include <folly/dynamic.h>
11+
#include <glog/logging.h>
1112
#include <sstream>
1213
#include <string>
1314
#include <vector>
@@ -31,6 +32,10 @@ std::string geometryBoxToString(facebook::react::GeometryBox box) {
3132
return "stroke-box";
3233
case facebook::react::GeometryBox::ViewBox:
3334
return "view-box";
35+
default:
36+
LOG(ERROR) << "Unexpected GeometryBox value: "
37+
<< static_cast<int>(box);
38+
return "";
3439
}
3540
}
3641
} // namespace

‎packages/react-native/ReactCommon/react/renderer/graphics/ClipPath.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#include <react/renderer/graphics/ValueUnit.h>
1313
#include <optional>
1414
#include <sstream>
15+
#include <utility>
16+
#include <variant>
17+
#include <vector>
1518

1619
#ifdef RN_SERIALIZABLE_STATE
1720
#include <folly/dynamic.h>

0 commit comments

Comments
 (0)