Skip to content

Commit

Permalink
Resolve React-cxxreact warnings (#28047)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
safaiyeh authored and facebook-github-bot committed Feb 13, 2020
1 parent d59f7d0 commit dc6c57c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ReactCommon/cxxreact/JSDeltaBundleClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ std::string startupCode(const folly::dynamic *pre, const folly::dynamic *post) {
} // namespace

void JSDeltaBundleClient::patchModules(const folly::dynamic *modules) {
for (const folly::dynamic pair : *modules) {
for (const folly::dynamic &pair : *modules) {
auto id = pair[0].getInt();
auto module = pair[1];
modules_[id] = std::move(module.getString());
Expand All @@ -53,7 +53,7 @@ void JSDeltaBundleClient::patch(const folly::dynamic &delta) {
} else {
const folly::dynamic *deleted = delta.get_ptr("deleted");
if (deleted != nullptr) {
for (const folly::dynamic id : *deleted) {
for (const folly::dynamic &id : *deleted) {
modules_.erase(id.getInt());
}
}
Expand Down

0 comments on commit dc6c57c

Please sign in to comment.