mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Refactor dataSize to use int instead of short
Summary: DynamicData can contain a big amount of data, refactoring type to use int instead of short changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D27904643 fbshipit-source-id: 157064b280e27a9c7c4a4f55af310392b178feda
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f946001c4e
commit
668d71aa0b
+4
-4
@@ -29,8 +29,8 @@ public class ReadableMapBuffer implements Iterable<ReadableMapBuffer.MapBufferEn
|
||||
// Value used to verify if the data is serialized with LittleEndian order.
|
||||
private static final int ALIGNMENT = 0xFE;
|
||||
|
||||
// 6 bytes = 2 (alignment) + 2 (count) + 2 (size)
|
||||
private static final int HEADER_SIZE = 6;
|
||||
// 8 bytes = 2 (alignment) + 2 (count) + 4 (size)
|
||||
private static final int HEADER_SIZE = 8;
|
||||
|
||||
// key size = 2 bytes
|
||||
private static final int KEY_SIZE = 2;
|
||||
@@ -50,7 +50,7 @@ public class ReadableMapBuffer implements Iterable<ReadableMapBuffer.MapBufferEn
|
||||
|
||||
// Size of the Serialized Data
|
||||
@SuppressWarnings("unused")
|
||||
private short mSizeOfData = 0;
|
||||
private int mSizeOfData = 0;
|
||||
|
||||
// Amount of items serialized on the ByteBuffer
|
||||
@SuppressWarnings("unused")
|
||||
@@ -178,7 +178,7 @@ public class ReadableMapBuffer implements Iterable<ReadableMapBuffer.MapBufferEn
|
||||
// count
|
||||
mCount = mBuffer.getShort();
|
||||
// size
|
||||
mSizeOfData = mBuffer.getShort();
|
||||
mSizeOfData = mBuffer.getInt();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user