diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/result.h | 10 | ||||
-rw-r--r-- | src/video_core/rasterizer.cpp | 8 |
2 files changed, 8 insertions, 10 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)); } }; diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 94873f406..81df09baf 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -266,10 +266,10 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, case Regs::TextureConfig::MirroredRepeat: { - int val = (int)((unsigned)val % (2 * size)); - if (val >= size) - val = 2 * size - 1 - val; - return val; + int coord = (int)((unsigned)val % (2 * size)); + if (coord >= size) + coord = 2 * size - 1 - coord; + return coord; } default: |