diff options
author | archshift <admin@archshift.com> | 2015-02-19 06:52:36 +0100 |
---|---|---|
committer | archshift <admin@archshift.com> | 2015-02-19 06:52:36 +0100 |
commit | 3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db (patch) | |
tree | f77c4d7608239c3cc221cce11a7f8364335cf263 /src/core | |
parent | Merge pull request #580 from lioncash/emplace (diff) | |
download | yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.tar yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.tar.gz yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.tar.bz2 yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.tar.lz yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.tar.xz yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.tar.zst yuzu-3c48697ea39aa5fbf477cf1f71fbd76a8c88f1db.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/result.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 9dbd5a914..0e391fe2d 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -4,7 +4,6 @@ #pragma once -#include <cassert> #include <cstddef> #include <type_traits> #include <utility> @@ -267,7 +266,7 @@ public: ResultVal(ResultCode error_code = ResultCode(-1)) : result_code(error_code) { - assert(error_code.IsError()); + ASSERT(error_code.IsError()); UpdateDebugPtr(); } @@ -330,7 +329,7 @@ public: */ template <typename... Args> void emplace(ResultCode success_code, Args&&... args) { - assert(success_code.IsSuccess()); + ASSERT(success_code.IsSuccess()); if (!empty()) { GetPointer()->~T(); } @@ -362,7 +361,6 @@ public: /// Asserts that the result succeeded and returns a reference to it. T& Unwrap() { - // TODO(yuriks): Should be a release assert ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); return **this; } @@ -389,12 +387,12 @@ private: } const T* GetPointer() const { - assert(!empty()); + ASSERT(!empty()); return static_cast<const T*>(static_cast<const void*>(&storage)); } T* GetPointer() { - assert(!empty()); + ASSERT(!empty()); return static_cast<T*>(static_cast<void*>(&storage)); } }; |