Skip to content

Commit dc6c57c

Browse files
safaiyehfacebook-github-bot
authored andcommitted
Resolve React-cxxreact warnings (#28047)
Summary: Resolve Xcode warnings from React-cxxreact. ## Changelog [iOS] [Fixed] - Resolve Xcode warnings from React-cxxreact. Pull Request resolved: #28047 Test Plan: React-cxxreact should no longer throw `... creates a copy from type...` warnings Differential Revision: D19874043 Pulled By: hramos fbshipit-source-id: 15a4a810adee268e6ede459d6d4917ccfa83c157
1 parent d59f7d0 commit dc6c57c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ReactCommon/cxxreact/JSDeltaBundleClient.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ std::string startupCode(const folly::dynamic *pre, const folly::dynamic *post) {
2828
} // namespace
2929

3030
void JSDeltaBundleClient::patchModules(const folly::dynamic *modules) {
31-
for (const folly::dynamic pair : *modules) {
31+
for (const folly::dynamic &pair : *modules) {
3232
auto id = pair[0].getInt();
3333
auto module = pair[1];
3434
modules_[id] = std::move(module.getString());
@@ -53,7 +53,7 @@ void JSDeltaBundleClient::patch(const folly::dynamic &delta) {
5353
} else {
5454
const folly::dynamic *deleted = delta.get_ptr("deleted");
5555
if (deleted != nullptr) {
56-
for (const folly::dynamic id : *deleted) {
56+
for (const folly::dynamic &id : *deleted) {
5757
modules_.erase(id.getInt());
5858
}
5959
}

0 commit comments

Comments
 (0)