From 309df9ed5bbfefc68fb0cf6285b41324961aebbc Mon Sep 17 00:00:00 2001 From: "Dr. Dystopia" Date: Sun, 28 Jul 2024 22:28:58 +0200 Subject: [PATCH] Replace boolean constants with boolean literals --- Source/Core/Core/Config/SYSCONFSettings.cpp | 2 +- Source/Core/Core/HW/WiimoteEmu/MotionPlus.cpp | 2 +- Source/Core/Core/IOS/FS/HostBackend/FS.cpp | 2 +- .../VideoCommon/VertexLoaderTest.cpp | 36 +++++++++---------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Source/Core/Core/Config/SYSCONFSettings.cpp b/Source/Core/Core/Config/SYSCONFSettings.cpp index e2263ceaba..2a6528b8e0 100644 --- a/Source/Core/Core/Config/SYSCONFSettings.cpp +++ b/Source/Core/Core/Config/SYSCONFSettings.cpp @@ -15,7 +15,7 @@ const Info SYSCONF_LANGUAGE{{System::SYSCONF, "IPL", "LNG"}, const Info SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, GetDefaultCountry()}; const Info SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true}; const Info SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true}; -const Info SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01}; +const Info SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, true}; const Info SYSCONF_SOUND_MODE{{System::SYSCONF, "IPL", "SND"}, 0x01}; // SYSCONF.BT diff --git a/Source/Core/Core/HW/WiimoteEmu/MotionPlus.cpp b/Source/Core/Core/HW/WiimoteEmu/MotionPlus.cpp index f2cae61ff3..6bbab12dd1 100644 --- a/Source/Core/Core/HW/WiimoteEmu/MotionPlus.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/MotionPlus.cpp @@ -719,7 +719,7 @@ void MotionPlus::ReversePassthroughModifications(PassthroughMode mode, u8* data) // This is an overwritten unused button bit on the Classic Controller. // Note it's a significant bit on the DJ Hero Turntable. (passthrough not feasible) - Common::SetBit<0>(data[4], 1); + Common::SetBit<0>(data[4], true); } } diff --git a/Source/Core/Core/IOS/FS/HostBackend/FS.cpp b/Source/Core/Core/IOS/FS/HostBackend/FS.cpp index 8ef5af6f71..da5fa6d983 100644 --- a/Source/Core/Core/IOS/FS/HostBackend/FS.cpp +++ b/Source/Core/Core/IOS/FS/HostBackend/FS.cpp @@ -290,7 +290,7 @@ void HostFileSystem::DoStateRead(PointerWrap& p, std::string start_directory_pat File::CreateDir(path); // now restore from the stream - while (1) + while (true) { char type = 0; p.Do(type); diff --git a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp index 853d690142..92a9888ba2 100644 --- a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp +++ b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp @@ -316,15 +316,15 @@ TEST_P(VertexLoaderSpeedTest, TexCoordSingleElement) TEST_F(VertexLoaderTest, LargeFloatVertexSpeed) { // Enables most attributes in floating point indexed mode to test speed. - m_vtx_desc.low.PosMatIdx = 1; - m_vtx_desc.low.Tex0MatIdx = 1; - m_vtx_desc.low.Tex1MatIdx = 1; - m_vtx_desc.low.Tex2MatIdx = 1; - m_vtx_desc.low.Tex3MatIdx = 1; - m_vtx_desc.low.Tex4MatIdx = 1; - m_vtx_desc.low.Tex5MatIdx = 1; - m_vtx_desc.low.Tex6MatIdx = 1; - m_vtx_desc.low.Tex7MatIdx = 1; + m_vtx_desc.low.PosMatIdx = true; + m_vtx_desc.low.Tex0MatIdx = true; + m_vtx_desc.low.Tex1MatIdx = true; + m_vtx_desc.low.Tex2MatIdx = true; + m_vtx_desc.low.Tex3MatIdx = true; + m_vtx_desc.low.Tex4MatIdx = true; + m_vtx_desc.low.Tex5MatIdx = true; + m_vtx_desc.low.Tex6MatIdx = true; + m_vtx_desc.low.Tex7MatIdx = true; m_vtx_desc.low.Position = VertexComponentFormat::Index16; m_vtx_desc.low.Normal = VertexComponentFormat::Index16; m_vtx_desc.low.Color0 = VertexComponentFormat::Index16; @@ -379,15 +379,15 @@ TEST_F(VertexLoaderTest, LargeFloatVertexSpeed) TEST_F(VertexLoaderTest, DirectAllComponents) { - m_vtx_desc.low.PosMatIdx = 1; - m_vtx_desc.low.Tex0MatIdx = 1; - m_vtx_desc.low.Tex1MatIdx = 1; - m_vtx_desc.low.Tex2MatIdx = 1; - m_vtx_desc.low.Tex3MatIdx = 1; - m_vtx_desc.low.Tex4MatIdx = 1; - m_vtx_desc.low.Tex5MatIdx = 1; - m_vtx_desc.low.Tex6MatIdx = 1; - m_vtx_desc.low.Tex7MatIdx = 1; + m_vtx_desc.low.PosMatIdx = true; + m_vtx_desc.low.Tex0MatIdx = true; + m_vtx_desc.low.Tex1MatIdx = true; + m_vtx_desc.low.Tex2MatIdx = true; + m_vtx_desc.low.Tex3MatIdx = true; + m_vtx_desc.low.Tex4MatIdx = true; + m_vtx_desc.low.Tex5MatIdx = true; + m_vtx_desc.low.Tex6MatIdx = true; + m_vtx_desc.low.Tex7MatIdx = true; m_vtx_desc.low.Position = VertexComponentFormat::Direct; m_vtx_desc.low.Normal = VertexComponentFormat::Direct; m_vtx_desc.low.Color0 = VertexComponentFormat::Direct;