mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-23 12:02:27 +00:00
refactor: remove dead code and fix thread safety in console_helpers
This commit is contained in:
@@ -1200,7 +1200,7 @@ int CompressedTileStorage::getHighestNonEmptyY() {
|
||||
void CompressedTileStorage::write(DataOutputStream* dos) {
|
||||
dos->writeInt(allocatedSize);
|
||||
if (indicesAndData) {
|
||||
if (LOCALSYTEM_ENDIAN == BIGENDIAN) {
|
||||
if (LOCALSYSTEM_ENDIAN == BIGENDIAN) {
|
||||
// The first 1024 bytes are an array of shorts, so we need to
|
||||
// reverse the endianness
|
||||
std::vector<uint8_t> indicesCopy(1024);
|
||||
@@ -1236,7 +1236,7 @@ void CompressedTileStorage::read(DataInputStream* dis) {
|
||||
std::vector<uint8_t> wrapper(allocatedSize);
|
||||
dis->readFully(wrapper);
|
||||
memcpy(indicesAndData, wrapper.data(), allocatedSize);
|
||||
if (LOCALSYTEM_ENDIAN == BIGENDIAN) {
|
||||
if (LOCALSYSTEM_ENDIAN == BIGENDIAN) {
|
||||
reverseIndices(indicesAndData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user