From 8594f4cbb0d34c2f9d4ac624c180ba0b765eb304 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 28 Jun 2022 16:13:33 +0200 Subject: [PATCH] NBT: Fix ambiguity between int types and bool when calling the ErrorOr<> constructor --- src/lib/nbt.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/nbt.cpp b/src/lib/nbt.cpp index 4642077..d6893f2 100644 --- a/src/lib/nbt.cpp +++ b/src/lib/nbt.cpp @@ -45,22 +45,22 @@ namespace NBT { namespace helper { ErrorOr readInt8(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) { //TODO: implement - return ErrorOr(0); + return ErrorOr((int8_t) 0); } ErrorOr readInt16(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) { //TODO: implement - return ErrorOr(0); + return ErrorOr((int16_t) 0); } ErrorOr readInt32(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) { //TODO: implement - return ErrorOr(0); + return ErrorOr((int32_t) 0); } ErrorOr readInt64(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) { //TODO: implement - return ErrorOr(0); + return ErrorOr((int64_t) 0); } //FIXME: we just assume that float is a single-precision IEEE754