mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Remove unused dictionary writing methods.
Change-Id: Ica6ac057c0d0f037b7dd5539ab5b591c83bfa4d7
This commit is contained in:
parent
cdc260b78e
commit
ed798fa308
@ -547,28 +547,6 @@ public class BinaryDictEncoderUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to write a signed children position to a file.
|
||||
*
|
||||
* @param buffer the buffer to write to.
|
||||
* @param index the index in the buffer to write the address to.
|
||||
* @param position the position to write.
|
||||
* @return the size in bytes the address actually took.
|
||||
*/
|
||||
/* package */ static int writeSignedChildrenPosition(final byte[] buffer, int index,
|
||||
final int position) {
|
||||
if (!BinaryDictIOUtils.hasChildrenAddress(position)) {
|
||||
buffer[index] = buffer[index + 1] = buffer[index + 2] = 0;
|
||||
} else {
|
||||
final int absPosition = Math.abs(position);
|
||||
buffer[index++] =
|
||||
(byte)((position < 0 ? FormatSpec.MSB8 : 0) | (0xFF & (absPosition >> 16)));
|
||||
buffer[index++] = (byte)(0xFF & (absPosition >> 8));
|
||||
buffer[index++] = (byte)(0xFF & absPosition);
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the flag value for a PtNode.
|
||||
*
|
||||
@ -734,10 +712,6 @@ public class BinaryDictEncoderUtils {
|
||||
|
||||
final int ptNodeCount = ptNodeArray.mData.size();
|
||||
dictEncoder.writePtNodeCount(ptNodeCount);
|
||||
final int parentPosition =
|
||||
(ptNodeArray.mCachedParentAddress == FormatSpec.NO_PARENT_ADDRESS)
|
||||
? FormatSpec.NO_PARENT_ADDRESS
|
||||
: ptNodeArray.mCachedParentAddress + ptNodeArray.mCachedAddressAfterUpdate;
|
||||
for (int i = 0; i < ptNodeCount; ++i) {
|
||||
final PtNode ptNode = ptNodeArray.mData.get(i);
|
||||
if (dictEncoder.getPosition() != ptNode.mCachedAddressAfterUpdate) {
|
||||
|
@ -33,6 +33,5 @@ public interface DictEncoder {
|
||||
public void setPosition(final int position);
|
||||
public int getPosition();
|
||||
public void writePtNodeCount(final int ptNodeCount);
|
||||
public void writeForwardLinkAddress(final int forwardLinkAddress);
|
||||
public void writePtNode(final PtNode ptNode, final FusionDictionary dict);
|
||||
}
|
||||
|
@ -222,12 +222,6 @@ public class Ver2DictEncoder implements DictEncoder {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeForwardLinkAddress(final int forwardLinkAddress) {
|
||||
mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, forwardLinkAddress,
|
||||
FormatSpec.FORWARD_LINK_ADDRESS_SIZE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writePtNode(final PtNode ptNode, final FusionDictionary dict) {
|
||||
writePtNodeFlags(ptNode);
|
||||
|
@ -140,10 +140,6 @@ public class Ver4DictEncoder implements DictEncoder {
|
||||
public void writePtNodeCount(int ptNodeCount) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeForwardLinkAddress(int forwardLinkAddress) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writePtNode(PtNode ptNode, FusionDictionary dict) {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user