mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Construct TrieMap from existing buffer.
Bug: 14425059 Change-Id: Ia1c58d88540f55fb38fe0bdfcd7c0a34ebc7415e
This commit is contained in:
parent
3437032a91
commit
de5c3a2562
@ -43,6 +43,10 @@ TrieMap::TrieMap() : mBuffer(MAX_BUFFER_SIZE) {
|
||||
writeEntry(EMPTY_BITMAP_ENTRY, ROOT_BITMAP_ENTRY_INDEX);
|
||||
}
|
||||
|
||||
TrieMap::TrieMap(uint8_t *const buffer, const int bufferSize)
|
||||
: mBuffer(buffer, bufferSize,
|
||||
BufferWithExtendableBuffer::DEFAULT_MAX_ADDITIONAL_BUFFER_SIZE) {}
|
||||
|
||||
void TrieMap::dump(const int from, const int to) const {
|
||||
AKLOGI("BufSize: %d", mBuffer.getTailPosition());
|
||||
for (int i = from; i < to; ++i) {
|
||||
|
@ -160,6 +160,8 @@ class TrieMap {
|
||||
static const uint64_t MAX_VALUE;
|
||||
|
||||
TrieMap();
|
||||
// Construct TrieMap using existing data in the memory region written by save().
|
||||
TrieMap(uint8_t *const buffer, const int bufferSize);
|
||||
void dump(const int from = 0, const int to = 0) const;
|
||||
|
||||
bool isNearSizeLimit() const {
|
||||
|
Loading…
Reference in New Issue
Block a user