mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix warnings about dungeongen.cpp memcpy() and unused variable in MapBlock::deSerializeNetworkSpecific() (#8122)
* Fix warning about dungeongen.cpp memcpy() * Fix unused variable in MapBlock::deSerializeNetworkSpecific() * Fix unused variable a simpler way
This commit is contained in:
parent
33afe1fb56
commit
bc1e54764b
@ -557,9 +557,10 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk)
|
|||||||
void MapBlock::deSerializeNetworkSpecific(std::istream &is)
|
void MapBlock::deSerializeNetworkSpecific(std::istream &is)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
const u8 version = readU8(is);
|
readU8(is);
|
||||||
//if(version != 1)
|
//const u8 version = readU8(is);
|
||||||
// throw SerializationError("unsupported MapBlock version");
|
//if (version != 1)
|
||||||
|
//throw SerializationError("unsupported MapBlock version");
|
||||||
|
|
||||||
} catch(SerializationError &e) {
|
} catch(SerializationError &e) {
|
||||||
warningstream<<"MapBlock::deSerializeNetworkSpecific(): Ignoring an error"
|
warningstream<<"MapBlock::deSerializeNetworkSpecific(): Ignoring an error"
|
||||||
|
@ -51,7 +51,7 @@ DungeonGen::DungeonGen(const NodeDefManager *ndef,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dparams) {
|
if (dparams) {
|
||||||
memcpy(&dp, dparams, sizeof(dp));
|
dp = *dparams;
|
||||||
} else {
|
} else {
|
||||||
// Default dungeon parameters
|
// Default dungeon parameters
|
||||||
dp.seed = 0;
|
dp.seed = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user