mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Avoid copying of std::string and pass std::shared_ptr by reference where possible. Changelog: [Internal] Reviewed By: appden Differential Revision: D36311151 fbshipit-source-id: b0cc791e5eb8353c172d256c69b166d2bdd0db27
20 lines
461 B
C++
20 lines
461 B
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "TurboModule.h"
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
TurboModule::TurboModule(
|
|
std::string name,
|
|
std::shared_ptr<CallInvoker> jsInvoker)
|
|
: name_(std::move(name)), jsInvoker_(std::move(jsInvoker)) {}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|