From 87927b371329c5502527d267657908a8573b25f4 Mon Sep 17 00:00:00 2001 From: AriAvery <41122212+AriAvery@users.noreply.github.com> Date: Wed, 6 Feb 2019 12:01:33 +0100 Subject: [PATCH] changed back to old comparing --- src/common/Vector3.cpp | 4 +--- src/common/Vector3.h | 17 +++++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/common/Vector3.cpp b/src/common/Vector3.cpp index 59cdc61e..b2f7f993 100644 --- a/src/common/Vector3.cpp +++ b/src/common/Vector3.cpp @@ -1,8 +1,6 @@ -#include - #include "Vector3.h" inline bool Sapphire::Common::FFXIVARR_POSITION3::operator == ( const FFXIVARR_POSITION3& target ) const { - return !memcmp( this, &target, sizeof( FFXIVARR_POSITION3 ) ); + return x == target.x && y == target.y && z == target.z; } diff --git a/src/common/Vector3.h b/src/common/Vector3.h index 407a3983..48f5f1db 100644 --- a/src/common/Vector3.h +++ b/src/common/Vector3.h @@ -1,18 +1,15 @@ #ifndef _VECTOR3_H_ #define _VECTOR3_H_ -namespace Sapphire +namespace Sapphire::Common { - namespace Common + struct FFXIVARR_POSITION3 { - struct FFXIVARR_POSITION3 - { - float x; - float y; - float z; - inline bool operator == ( const FFXIVARR_POSITION3& target ) const; - }; - } + float x; + float y; + float z; + inline bool operator == ( const FFXIVARR_POSITION3& target ) const; + }; } #endif \ No newline at end of file