Commit d177839
Fix bugprone-use-after-move in JSINativeModules.cpp and bugprone-optional-value-conversion in TextAttributes.cpp (#56047)
Summary:
Pull Request resolved: #56047
Fixes:
1. **bugprone-use-after-move** (JSINativeModules.cpp:61): `moduleName` was used
after being moved into `m_objects.emplace()`. The perf logger call now reads
the module name from the map iterator (`result->first`) instead of the
moved-from string.
2. **bugprone-optional-value-conversion** (TextAttributes.cpp:91): Unnecessary
`optional<Size> -> Size -> optional<Size>` round-trip via `.value()`. Changed
to assign the optional directly, matching the pattern used by all surrounding
fields.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D95760414
fbshipit-source-id: 0c35415bbb27b8827a31a13d91c1e933fcfb6aa71 parent 116ea59 commit d177839
2 files changed
Lines changed: 2 additions & 2 deletions
File tree
- packages/react-native/ReactCommon
- jsiexecutor/jsireact
- react/renderer/attributedstring
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments