From bba4563d89b6708d75a4053c69873dff0d747538 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Thu, 3 Jan 2019 17:04:26 +0100 Subject: Proselytize the network. Use IEEE F32 (#8030) * Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions --- src/mapblock.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/mapblock.cpp') diff --git a/src/mapblock.cpp b/src/mapblock.cpp index dfb4c783e..734ea478d 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -446,9 +446,7 @@ void MapBlock::serializeNetworkSpecific(std::ostream &os) throw SerializationError("ERROR: Not writing dummy block."); } - writeU8(os, 1); // version - writeF1000(os, 0); // deprecated heat - writeF1000(os, 0); // deprecated humidity + writeU8(os, 2); // version } void MapBlock::deSerialize(std::istream &is, u8 version, bool disk) @@ -559,16 +557,11 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk) void MapBlock::deSerializeNetworkSpecific(std::istream &is) { try { - int version = readU8(is); + const u8 version = readU8(is); //if(version != 1) // throw SerializationError("unsupported MapBlock version"); - if(version >= 1) { - readF1000(is); // deprecated heat - readF1000(is); // deprecated humidity - } - } - catch(SerializationError &e) - { + + } catch(SerializationError &e) { warningstream<<"MapBlock::deSerializeNetworkSpecific(): Ignoring an error" <<": "<