Skip to content

Commit

Permalink
Remove unneeded const_cast (facebook#41712)
Browse files Browse the repository at this point in the history
Summary:

I fixed the const correctness of YGConfigGetErrata a while back when fixing up other YGConfig accessors.

Changelog: [Internal]

Differential Revision: D51689323
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Nov 30, 2023
1 parent c8db60c commit bd5e7d7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ void YogaLayoutableShadowNode::configureYogaTree(
for (size_t i = 0; i < yogaLayoutableChildren_.size(); i++) {
const auto& child = *yogaLayoutableChildren_[i];
auto childLayoutMetrics = child.getLayoutMetrics();
auto childErrata =
YGConfigGetErrata(const_cast<yoga::Config*>(&child.yogaConfig_));
auto childErrata = YGConfigGetErrata(&child.yogaConfig_);

if (child.yogaTreeHasBeenConfigured_ &&
childLayoutMetrics.pointScaleFactor == pointScaleFactor &&
Expand Down

0 comments on commit bd5e7d7

Please sign in to comment.