From c6443e0bb1416baa7b1cb7ed1fea4c212f29cc4e Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Tue, 26 Nov 2024 20:13:26 -0300 Subject: [PATCH] Prevent potential operator precedence confusion The following are not the same: bMemoryLess && (allowMemoryless() ? TextureFlags::TilerMemoryless : 0) vs (bMemoryLess && allowMemoryless()) ? TextureFlags::TilerMemoryless : 0 Regardless of C++ operator rules, mark intent very explicit. --- RenderSystems/Metal/src/OgreMetalTextureGpuManager.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RenderSystems/Metal/src/OgreMetalTextureGpuManager.mm b/RenderSystems/Metal/src/OgreMetalTextureGpuManager.mm index cd7f2dbc58..43fc1be45a 100644 --- a/RenderSystems/Metal/src/OgreMetalTextureGpuManager.mm +++ b/RenderSystems/Metal/src/OgreMetalTextureGpuManager.mm @@ -163,7 +163,7 @@ of this software and associated documentation files (the "Software"), to deal return OGRE_NEW MetalTextureGpuRenderTarget( GpuPageOutStrategy::Discard, mVaoManager, "RenderWindow DepthBuffer", TextureFlags::NotTexture | TextureFlags::RenderToTexture | - ( bMemoryLess && allowMemoryless() ? TextureFlags::TilerMemoryless : 0 ) | + ( ( bMemoryLess && allowMemoryless() ) ? TextureFlags::TilerMemoryless : 0 ) | TextureFlags::RenderWindowSpecific | TextureFlags::DiscardableContent, TextureTypes::Type2D, this ); }