Apply fixes from clag-tidy misc-unused-parameters (#1293)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1293

X-link: https://github.com/facebook/react-native/pull/37384

Gets the project mostly clean of `-Wunused-parameter`, part of `-Wextra`.

Reviewed By: yungsters

Differential Revision: D45772554

fbshipit-source-id: db4c4d2bd222debef178c4c16f7b60fb6c8db2a2
This commit is contained in:
Nick Gerleman
2023-05-11 09:43:36 -07:00
committed by Facebook GitHub Bot
parent 9e1b14cd9e
commit a97dbecb49
9 changed files with 139 additions and 127 deletions

View File

@@ -11,10 +11,10 @@
static YGSize _measure(
YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
float /*width*/,
YGMeasureMode /*widthMode*/,
float /*height*/,
YGMeasureMode /*heightMode*/) {
int* measureCount = (int*) node->getContext();
if (measureCount) {
(*measureCount)++;
@@ -24,11 +24,11 @@ static YGSize _measure(
}
static YGSize _simulate_wrapping_text(
YGNodeRef node,
YGNodeRef /*node*/,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
float /*height*/,
YGMeasureMode /*heightMode*/) {
if (widthMode == YGMeasureModeUndefined || width >= 68) {
return YGSize{68, 16};
}
@@ -37,11 +37,11 @@ static YGSize _simulate_wrapping_text(
}
static YGSize _measure_assert_negative(
YGNodeRef node,
YGNodeRef /*node*/,
float width,
YGMeasureMode widthMode,
YGMeasureMode /*widthMode*/,
float height,
YGMeasureMode heightMode) {
YGMeasureMode /*heightMode*/) {
EXPECT_GE(width, 0);
EXPECT_GE(height, 0);
@@ -641,21 +641,21 @@ TEST(YogaTest, cant_call_negative_measure_horizontal) {
}
static YGSize _measure_90_10(
YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
YGNodeRef /*node*/,
float /*width*/,
YGMeasureMode /*widthMode*/,
float /*height*/,
YGMeasureMode /*heightMode*/) {
return YGSize{90, 10};
}
static YGSize _measure_100_100(
YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
YGNodeRef /*node*/,
float /*width*/,
YGMeasureMode /*widthMode*/,
float /*height*/,
YGMeasureMode /*heightMode*/) {
return YGSize{100, 100};
}