[*] fix optionals

This commit is contained in:
Reece Wilson 2024-01-21 00:34:47 +00:00
parent 4f340aae47
commit db37b81729
2 changed files with 5 additions and 2 deletions

View File

@ -89,7 +89,7 @@ namespace Aurora::Compression
if (meta.uOptWindowBits.value() <= BROTLI_MAX_INPUT_BLOCK_BITS &&
meta.uOptWindowBits.value() >= BROTLI_MIN_INPUT_BLOCK_BITS)
{
if (!BrotliEncoderSetParameter(this->pState, BrotliEncoderParameter::BROTLI_PARAM_LGWIN, meta.uOptWindowBits))
if (!BrotliEncoderSetParameter(this->pState, BrotliEncoderParameter::BROTLI_PARAM_LGWIN, meta.uOptWindowBits.value()))
{
SysPushErrorArg("Compressor couldn't set window bits");
return false;

View File

@ -398,7 +398,10 @@ namespace Aurora::Parse
}
case ParsableTag::kParseUUID:
{
uuid = uuids::uuid::from_string(str);
if (auto uuid2 = uuids::uuid::from_string(str))
{
uuid = *uuid2;
}
if (!uuid.has_value())
{
SysPushErrorSyntaxError("Parse Error: invalid UUID {}", str);