From 0b1c1b3a8d546c6a891aebd97cf22d123bef8ad9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Perrier Date: Thu, 8 Apr 2021 18:54:09 +0200 Subject: [PATCH] Refactor Int2 operation. --- Source/Engine/Core/Math/Int2.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Engine/Core/Math/Int2.h b/Source/Engine/Core/Math/Int2.h index 05861c493..682190fa8 100644 --- a/Source/Engine/Core/Math/Int2.h +++ b/Source/Engine/Core/Math/Int2.h @@ -234,29 +234,29 @@ public: public: - static void Add(const Int2& a, const Int2& b, Int2* result) + static void Add(const Int2& a, const Int2& b, Int2& result) { - result->X = a.X + b.X; - result->Y = a.Y + b.Y; + result.X = a.X + b.X; + result.Y = a.Y + b.Y; } static Int2 Add(const Int2& a, const Int2& b) { Int2 result; - Add(a, b, &result); + Add(a, b, result); return result; } - static void Subtract(const Int2& a, const Int2& b, Int2* result) + static void Subtract(const Int2& a, const Int2& b, Int2& result) { - result->X = a.X - b.X; - result->Y = a.Y - b.Y; + result.X = a.X - b.X; + result.Y = a.Y - b.Y; } static Int2 Subtract(const Int2& a, const Int2& b) { Int2 result; - Subtract(a, b, &result); + Subtract(a, b, result); return result; }