summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/result.h10
-rw-r--r--src/video_core/rasterizer.cpp8
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 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cassert>
8#include <cstddef> 7#include <cstddef>
9#include <type_traits> 8#include <type_traits>
10#include <utility> 9#include <utility>
@@ -267,7 +266,7 @@ public:
267 ResultVal(ResultCode error_code = ResultCode(-1)) 266 ResultVal(ResultCode error_code = ResultCode(-1))
268 : result_code(error_code) 267 : result_code(error_code)
269 { 268 {
270 assert(error_code.IsError()); 269 ASSERT(error_code.IsError());
271 UpdateDebugPtr(); 270 UpdateDebugPtr();
272 } 271 }
273 272
@@ -330,7 +329,7 @@ public:
330 */ 329 */
331 template <typename... Args> 330 template <typename... Args>
332 void emplace(ResultCode success_code, Args&&... args) { 331 void emplace(ResultCode success_code, Args&&... args) {
333 assert(success_code.IsSuccess()); 332 ASSERT(success_code.IsSuccess());
334 if (!empty()) { 333 if (!empty()) {
335 GetPointer()->~T(); 334 GetPointer()->~T();
336 } 335 }
@@ -362,7 +361,6 @@ public:
362 361
363 /// Asserts that the result succeeded and returns a reference to it. 362 /// Asserts that the result succeeded and returns a reference to it.
364 T& Unwrap() { 363 T& Unwrap() {
365 // TODO(yuriks): Should be a release assert
366 ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); 364 ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal");
367 return **this; 365 return **this;
368 } 366 }
@@ -389,12 +387,12 @@ private:
389 } 387 }
390 388
391 const T* GetPointer() const { 389 const T* GetPointer() const {
392 assert(!empty()); 390 ASSERT(!empty());
393 return static_cast<const T*>(static_cast<const void*>(&storage)); 391 return static_cast<const T*>(static_cast<const void*>(&storage));
394 } 392 }
395 393
396 T* GetPointer() { 394 T* GetPointer() {
397 assert(!empty()); 395 ASSERT(!empty());
398 return static_cast<T*>(static_cast<void*>(&storage)); 396 return static_cast<T*>(static_cast<void*>(&storage));
399 } 397 }
400}; 398};
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,
266 266
267 case Regs::TextureConfig::MirroredRepeat: 267 case Regs::TextureConfig::MirroredRepeat:
268 { 268 {
269 int val = (int)((unsigned)val % (2 * size)); 269 int coord = (int)((unsigned)val % (2 * size));
270 if (val >= size) 270 if (coord >= size)
271 val = 2 * size - 1 - val; 271 coord = 2 * size - 1 - coord;
272 return val; 272 return coord;
273 } 273 }
274 274
275 default: 275 default: