From 2069694b59b2198f75474049cbea43c118e61edd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 12 Apr 2020 08:52:21 -0400 Subject: [PATCH] CFluidPlane: Make use of HasReference() instead of operator bool Looks a little less out of place while performing the same behavior. IDE's can also do lookup more reliably on a regular function as opposed to a conversion operator. --- Runtime/World/CFluidPlane.hpp | 6 +++--- Runtime/World/CFluidPlaneCPU.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Runtime/World/CFluidPlane.hpp b/Runtime/World/CFluidPlane.hpp index c5c70128e..4bb69e546 100644 --- a/Runtime/World/CFluidPlane.hpp +++ b/Runtime/World/CFluidPlane.hpp @@ -168,10 +168,10 @@ public: EFluidType GetFluidType() const { return x44_fluidType; } const CFluidUVMotion& GetUVMotion() const { return x4c_uvMotion; } const CTexture& GetColorTexture() const { return *x30_texColor; } - bool HasColorTexture() const { return x30_texColor.operator bool(); } + bool HasColorTexture() const { return x30_texColor.HasReference(); } const CTexture& GetTexturePattern1() const { return *x10_texPattern1; } - bool HasTexturePattern1() const { return x10_texPattern1.operator bool(); } + bool HasTexturePattern1() const { return x10_texPattern1.HasReference(); } const CTexture& GetTexturePattern2() const { return *x20_texPattern2; } - bool HasTexturePattern2() const { return x20_texPattern2.operator bool(); } + bool HasTexturePattern2() const { return x20_texPattern2.HasReference(); } }; } // namespace urde diff --git a/Runtime/World/CFluidPlaneCPU.hpp b/Runtime/World/CFluidPlaneCPU.hpp index 6572ad38e..b7a569d5a 100644 --- a/Runtime/World/CFluidPlaneCPU.hpp +++ b/Runtime/World/CFluidPlaneCPU.hpp @@ -106,13 +106,13 @@ public: float GetSpecularMin() const { return x10c_specularMin; } float GetReflectionSize() const { return x118_reflectionSize; } float GetBumpScale() const { return xfc_bumpScale; } - bool HasBumpMap() const { return xb0_bumpMap.operator bool(); } + bool HasBumpMap() const { return xb0_bumpMap.HasReference(); } const CTexture& GetBumpMap() const { return *xb0_bumpMap; } - bool HasEnvMap() const { return xc0_envMap.operator bool(); } + bool HasEnvMap() const { return xc0_envMap.HasReference(); } const CTexture& GetEnvMap() const { return *xc0_envMap; } - bool HasEnvBumpMap() const { return xd0_envBumpMap.operator bool(); } + bool HasEnvBumpMap() const { return xd0_envBumpMap.HasReference(); } const CTexture& GetEnvBumpMap() const { return *xd0_envBumpMap; } - bool HasLightMap() const { return xe0_lightmap.operator bool(); } + bool HasLightMap() const { return xe0_lightmap.HasReference(); } const CTexture& GetLightMap() const { return *xe0_lightmap; } const zeus::CVector3f& GetBumpLightDir() const { return xf0_bumpLightDir; } float GetTileSize() const { return x100_tileSize; }