result: Make fully constexpr, add ON_RESULT_INCLUDED

This commit is contained in:
FearlessTobi 2024-01-18 22:39:15 +01:00 committed by Liam
parent c60ab6bbf6
commit 54372fdff5
9 changed files with 57 additions and 29 deletions

View file

@ -27,8 +27,8 @@ struct ErrorCode {
static constexpr ErrorCode FromResult(Result result) {
return {
.error_category{2000 + static_cast<u32>(result.module.Value())},
.error_number{result.description.Value()},
.error_category{2000 + static_cast<u32>(result.GetModule())},
.error_number{result.GetDescription()},
};
}