Skip to content

Commit 1a0b81a

Browse files
committed
uint8_t --> std::size_t
1 parent 9669157 commit 1a0b81a

File tree

1 file changed

+6
-6
lines changed
  • packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view

1 file changed

+6
-6
lines changed

packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view/MacOSViewEvents.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ namespace facebook::react {
1616

1717
// TODO: Windows names this "WindowsEvents" and drops "View". Should we?
1818
struct MacOSViewEvents {
19-
std::bitset<8> bits{}; // TODO: Windows sets this to 32.. should we be higher?
19+
std::bitset<64> bits{};
2020

21-
enum class Offset : uint8_t { // TODO: Windows sets this and others to std::size_t instead of uint8_t.. should we?
21+
enum class Offset : std::size_t {
2222
// Focus Events
2323
Focus = 0,
2424
Blur = 1,
2525
};
2626

2727
constexpr bool operator[](const Offset offset) const {
28-
return bits[static_cast<uint8_t>(offset)];
28+
return bits[static_cast<std::size_t >(offset)];
2929
}
3030

31-
std::bitset<8>::reference operator[](const Offset offset) {
32-
return bits[static_cast<uint8_t>(offset)];
31+
std::bitset<64>::reference operator[](const Offset offset) {
32+
return bits[static_cast<std::size_t >(offset)];
3333
}
3434
};
3535

@@ -58,4 +58,4 @@ static inline MacOSViewEvents convertRawProp(
5858
return result;
5959
}
6060

61-
} // namespace facebook::react
61+
} // namespace facebook::react

0 commit comments

Comments
 (0)