Skip to content

Commit

Permalink
Convert RCTConvert to mm in preparation for DisplayP3 changes
Browse files Browse the repository at this point in the history
Summary:
This is a preliminary change which converts RCTConvert to an objectiveC++ file. This is required by the next diffs in the stack.

## Changelog
[iOS][Changed] - Make RCTConvert an Objective-C++ (`.mm`) file in prep for DisplayP3 changes

Reviewed By: javache

Differential Revision: D53520228

fbshipit-source-id: cf45c42955401b4e14fe68221129077817b2598e
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 16, 2024
1 parent eca78c3 commit 267ea26
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ + (UIKeyboardType)UIKeyboardType:(id)json RCT_DYNAMIC
mapping = temporaryMapping;
});

UIKeyboardType type = RCTConvertEnumValue("UIKeyboardType", mapping, @(UIKeyboardTypeDefault), json).integerValue;
UIKeyboardType type =
(UIKeyboardType)RCTConvertEnumValue("UIKeyboardType", mapping, @(UIKeyboardTypeDefault), json).integerValue;
return type;
}

Expand Down Expand Up @@ -844,7 +845,7 @@ + (UIEdgeInsets)UIEdgeInsets:(id)json
RCTAssert([UIColor respondsToSelector:selector], @"RCTUIColor does not respond to a semantic color selector.");
Class klass = [UIColor class];
IMP imp = [klass methodForSelector:selector];
id (*getSemanticColorObject)(id, SEL) = (void *)imp;
id (*getSemanticColorObject)(id, SEL) = (id(*)(id, SEL))imp;
id colorObject = getSemanticColorObject(klass, selector);
if ([colorObject isKindOfClass:[UIColor class]]) {
color = colorObject;
Expand Down

0 comments on commit 267ea26

Please sign in to comment.