libluna: Remove redundant return statements in Result<void>

This commit is contained in:
apio 2023-04-23 21:15:00 +02:00
parent 37547ec640
commit de25338d6c
Signed by: asleepymoon
GPG Key ID: B8A7D06E42258954

View File

@ -237,25 +237,21 @@ template <> class Result<void>
void value(SourceLocation caller = SourceLocation::current()) const
{
expect_at(has_value(), caller, "Result::value() called on a Result that holds an error");
return;
}
void expect_value(const char* reason, SourceLocation caller = SourceLocation::current()) const
{
expect_at(has_value(), caller, reason);
return;
}
void release_value(SourceLocation caller = SourceLocation::current()) const
{
expect_at(has_value(), caller, "Result::release_value() called on a Result that holds an error");
return;
}
void expect_release_value(const char* reason, SourceLocation caller = SourceLocation::current()) const
{
expect_at(has_value(), caller, reason);
return;
}
private: