Result destructor for _errorMessage.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-12-11 16:42:58 +01:00
parent fdfd5f05c0
commit 577f105c61
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,12 @@ namespace ArbUt {
return *this;
}
~Result() {
if (_resultStatus == ResultStatus::Error) {
delete _errorMessage;
}
}
/// @brief Returns whether or not the function succeeded,
/// @return Whether or not the function succeeded.
[[nodiscard]] inline ResultStatus GetStatus() const noexcept { return _resultStatus; }