mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9ca30adff8
Summary: In this diff I'm excluding mapbuffer files from Mac/iOS builds changelog: [internal] internal Reviewed By: javache Differential Revision: D41309209 fbshipit-source-id: d92ae685ac05592e326ec3e046106f9a884271d6
37 lines
792 B
C++
37 lines
792 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 "PropsMapBuffer.h"
|
|
#include "Props.h"
|
|
|
|
#ifdef ANDROID
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
void Props::propsDiffMapBuffer(
|
|
Props const *oldPropsPtr,
|
|
MapBufferBuilder &builder) const {
|
|
// Call with default props if necessary
|
|
if (oldPropsPtr == nullptr) {
|
|
Props defaultProps{};
|
|
propsDiffMapBuffer(&defaultProps, builder);
|
|
return;
|
|
}
|
|
|
|
Props const &oldProps = *oldPropsPtr;
|
|
Props const &newProps = *this;
|
|
|
|
if (oldProps.nativeId != newProps.nativeId) {
|
|
builder.putString(PROPS_NATIVE_ID, nativeId);
|
|
}
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|
|
#endif
|