Resolve React-cxxreact warnings (#28047)

Summary:
Resolve Xcode warnings from React-cxxreact.

## Changelog

[iOS] [Fixed] - Resolve Xcode warnings from React-cxxreact.
Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
Jason Safaiyeh
2020-02-12 23:49:15 -08:00
committed by Facebook Github Bot
parent d59f7d07bf
commit dc6c57ce0d
+2 -2
View File
@@ -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());
@@ -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());
}
}