Skip to content

Commit 000c135

Browse files
Fix unused parameter warnings in graphicsConversions.h (#56520)
Summary: Fixed clang-diagnostic-unused-parameter warnings in graphicsConversions.h by commenting out unused `context` parameters in 4 fromRawValue() functions. The `context` parameter is part of the fromRawValue interface but is not used in the Point, Size, EdgeInsets, and CornerInsets implementations. Used the comment-out approach (/* context */) to maintain API compatibility while fixing the warnings. Changelog: [Internal] Differential Revision: D101108326
1 parent 786ebf0 commit 000c135

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/react-native/ReactCommon/react/renderer/core/graphicsConversions.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ inline folly::dynamic toDynamic(const Point &point)
8383
}
8484
#endif
8585

86-
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, Point &result)
86+
inline void fromRawValue(const PropsParserContext & /*context*/, const RawValue &value, Point &result)
8787
{
8888
if (value.hasType<std::unordered_map<std::string, Float>>()) {
8989
auto map = (std::unordered_map<std::string, Float>)value;
@@ -112,7 +112,7 @@ inline void fromRawValue(const PropsParserContext &context, const RawValue &valu
112112
}
113113
}
114114

115-
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, Size &result)
115+
inline void fromRawValue(const PropsParserContext & /*context*/, const RawValue &value, Size &result)
116116
{
117117
if (value.hasType<std::unordered_map<std::string, Float>>()) {
118118
auto map = (std::unordered_map<std::string, Float>)value;
@@ -144,7 +144,7 @@ inline void fromRawValue(const PropsParserContext &context, const RawValue &valu
144144
}
145145
}
146146

147-
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, EdgeInsets &result)
147+
inline void fromRawValue(const PropsParserContext & /*context*/, const RawValue &value, EdgeInsets &result)
148148
{
149149
if (value.hasType<Float>()) {
150150
auto number = (Float)value;
@@ -198,7 +198,7 @@ inline folly::dynamic toDynamic(const EdgeInsets &edgeInsets)
198198
}
199199
#endif
200200

201-
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, CornerInsets &result)
201+
inline void fromRawValue(const PropsParserContext & /*context*/, const RawValue &value, CornerInsets &result)
202202
{
203203
if (value.hasType<Float>()) {
204204
auto number = (Float)value;

0 commit comments

Comments
 (0)