Common: Replace Result with C++23's std::expected.
This commit is contained in:
1 parent
b556bd99d7
commit
dffc7a650d
24 files changed
+164
-197
No files matched your search
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <expected>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -210,7 +211,7 @@ static ConversionResult<OutputParameters> Compress(CompressThreadState* state,
|
||||
if (retval != Z_OK)
|
||||
{
|
||||
ERROR_LOG_FMT(DISCIO, "Deflate failed");
|
||||
return ConversionResultCode::InternalError;
|
||||
return std::unexpected{ConversionResultCode::InternalError};
|
||||
}
|
||||
|
||||
const int status = deflate(&state->z, Z_FINISH);
|
||||
|
||||
Reference in new issue
Block a user