NBT: Fix ambiguity between int types and bool when calling the ErrorOr<> constructor

BodgeMaster-unfinished
BodgeMaster 2022-06-28 16:13:33 +02:00
parent 83d606a2c7
commit 8594f4cbb0
1 changed files with 4 additions and 4 deletions

View File

@ -45,22 +45,22 @@ namespace NBT {
namespace helper {
ErrorOr<int8_t> readInt8(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) {
//TODO: implement
return ErrorOr<int8_t>(0);
return ErrorOr<int8_t>((int8_t) 0);
}
ErrorOr<int16_t> readInt16(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) {
//TODO: implement
return ErrorOr<int16_t>(0);
return ErrorOr<int16_t>((int16_t) 0);
}
ErrorOr<int32_t> readInt32(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) {
//TODO: implement
return ErrorOr<int32_t>(0);
return ErrorOr<int32_t>((int32_t) 0);
}
ErrorOr<int64_t> readInt64(uint8_t* data[], uint64_t dataSize, uint64_t currentPosition) {
//TODO: implement
return ErrorOr<int64_t>(0);
return ErrorOr<int64_t>((int64_t) 0);
}
//FIXME: we just assume that float is a single-precision IEEE754