Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation warnings related to YogaShadowNode #38781

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void YogaLayoutableShadowNode::appendChild(
void YogaLayoutableShadowNode::replaceChild(
ShadowNode const &oldChild,
ShadowNode::Shared const &newChild,
size_t suggestedIndex) {
int32_t suggestedIndex) {
LayoutableShadowNode::replaceChild(oldChild, newChild, suggestedIndex);

ensureUnsealed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class YogaLayoutableShadowNode : public LayoutableShadowNode {
void replaceChild(
ShadowNode const &oldChild,
ShadowNode::Shared const &newChild,
size_t suggestedIndex = -1) override;
int32_t suggestedIndex = -1) override;

void updateYogaChildren();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void YogaStylableProps::setProp(
const char *propName,
RawValue const &value) {
static const auto ygDefaults = YGStyle{};
static const auto defaults = YogaStylableProps{};

Props::setProp(context, hash, propName, value);

Expand Down Expand Up @@ -133,8 +134,6 @@ void YogaStylableProps::setProp(
REBUILD_FIELD_YG_EDGES(padding, "padding", "");
REBUILD_FIELD_YG_EDGES(border, "border", "Width");

static const auto defaults = YogaStylableProps{};

// Aliases
RAW_SET_PROP_SWITCH_CASE(inset, "inset");
RAW_SET_PROP_SWITCH_CASE(insetBlock, "insetBlock");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void ShadowNode::appendChild(const ShadowNode::Shared &child) {
void ShadowNode::replaceChild(
ShadowNode const &oldChild,
ShadowNode::Shared const &newChild,
size_t suggestedIndex) {
int32_t suggestedIndex) {
ensureUnsealed();

cloneChildrenIfShared();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class ShadowNode : public Sealable,
virtual void replaceChild(
ShadowNode const &oldChild,
Shared const &newChild,
size_t suggestedIndex = -1);
int32_t suggestedIndex = -1);

/*
* Performs all side effects associated with mounting/unmounting in one place.
Expand Down