mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Add a Result.Log() method to aid in debugging
This commit is contained in:
parent
cb705c5f0f
commit
d610d2262b
1 changed files with 11 additions and 0 deletions
|
@ -32,6 +32,17 @@ namespace LibHac
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A function that can contain code for logging or debugging returned results.
|
||||
/// Intended to be used when returning a non-zero Result:
|
||||
/// <code>return result.Log();</code>
|
||||
/// </summary>
|
||||
/// <returns>The called <see cref="Result"/> value.</returns>
|
||||
public Result Log()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is Result result && Equals(result);
|
||||
|
|
Loading…
Reference in a new issue