Commit 98df9b1
Fix RCTTextLayoutManager nullable conversion (#56547)
Summary:
Pull Request resolved: #56547
The original fix in `RCTTextLayoutManager.mm` used the pattern `[obj UTF8String] != nullptr ? [obj UTF8String] : ""`, but Clang's null analysis still types the first operand as `_Nullable`, so `-Wnullable-to-nonnull-conversion` is still triggered as a hard error under Xcode 26.4. Switch to the local-variable pattern that was already used correctly for `RNTMyNativeViewCommon.mm`:
```
const char *renderedUTF8 = [renderedString UTF8String];
... std::string(renderedUTF8 != nullptr ? renderedUTF8 : "") ...
```
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D101920741
fbshipit-source-id: 918e1638e65f62bb8d87628636297f8f7eef221e1 parent 54ced39 commit 98df9b1
1 file changed
Lines changed: 2 additions & 2 deletions
File tree
- packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | | - | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
0 commit comments