Use const reference in RCTNativeModule::invokeInner

Reviewed By: mhorowitz

Differential Revision: D5909088

fbshipit-source-id: 3104e3d0a4b29d457c3c7fad2a29e2f0943b478d
This commit is contained in:
Alex Dvornikov 2017-09-25 20:18:05 -07:00 committed by Facebook Github Bot
parent bd70f3ab3b
commit 29e7659111
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class RCTNativeModule : public NativeModule {
private:
__weak RCTBridge *m_bridge;
RCTModuleData *m_moduleData;
MethodCallResult invokeInner(unsigned int methodId, const folly::dynamic &&params);
MethodCallResult invokeInner(unsigned int methodId, const folly::dynamic &params);
};
}

View File

@ -77,10 +77,10 @@ void RCTNativeModule::invoke(unsigned int methodId, folly::dynamic &&params, int
}
MethodCallResult RCTNativeModule::callSerializableNativeHook(unsigned int reactMethodId, folly::dynamic &&params) {
return invokeInner(reactMethodId, std::move(params));
return invokeInner(reactMethodId, params);
}
MethodCallResult RCTNativeModule::invokeInner(unsigned int methodId, const folly::dynamic &&params) {
MethodCallResult RCTNativeModule::invokeInner(unsigned int methodId, const folly::dynamic &params) {
if (!m_bridge.valid) {
return folly::none;
}