Files
react-native/ReactCommon/react/renderer/core/PropsMapBuffer.cpp
T
David Vacca 9ca30adff8 Exclude mapbuffer files from Mac/iOS builds
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
2022-11-15 12:17:18 -08:00

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