Skip to content

Commit f1d97ff

Browse files
coadometa-codesync[bot]
authored andcommitted
Clean up MapBuffer public header dependencies (#58715)
Summary: Pull Request resolved: #58715 Keep MapBuffer exported headers self-contained by removing implementation-only Debug and logging dependencies. Move those includes into the source files that use them and declare standard-library dependencies directly. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D121398637 fbshipit-source-id: 57f9e4739ca88d5ae385e560f289daebd22ea0a4
1 parent ff19940 commit f1d97ff

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

‎packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
*/
77

88
#include "MapBuffer.h"
9+
#include <react/debug/react_native_assert.h>
910
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
1011

1112
#include <algorithm>
13+
#include <cstddef>
1214
#include <cstring>
15+
#include <utility>
1316

1417
namespace facebook::react {
1518

‎packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBuffer.h‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@
88
#pragma once
99

1010
#include <react/cxxstableapi/UmbrellaGuard.h>
11-
#include <react/debug/react_native_assert.h>
12-
13-
#include <glog/logging.h>
1411

12+
#include <cstddef>
1513
#include <cstdint>
16-
#include <cstdlib>
17-
#include <limits>
1814
#include <string>
1915
#include <vector>
2016

‎packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
*/
77

88
#include "MapBufferBuilder.h"
9+
10+
#include <glog/logging.h>
11+
912
#include <algorithm>
13+
#include <cstdlib>
14+
#include <cstring>
15+
#include <utility>
1016

1117
namespace facebook::react {
1218

@@ -40,7 +46,7 @@ void MapBufferBuilder::storeKeyValue(
4046
if (valueSize > MAX_BUCKET_VALUE_SIZE) {
4147
LOG(ERROR) << "Error: size of value must be <= MAX_VALUE_SIZE. ValueSize: "
4248
<< valueSize;
43-
abort();
49+
std::abort();
4450
}
4551

4652
uint64_t data = 0;

‎packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
#pragma once
99

1010
#include <react/cxxstableapi/UmbrellaGuard.h>
11-
#include <react/debug/react_native_assert.h>
11+
12+
#include <cstdint>
13+
#include <string>
1214
#include <vector>
15+
1316
#include "MapBuffer.h"
1417

1518
namespace facebook::react {

0 commit comments

Comments
 (0)