Skip to content

Commit

Permalink
warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-…
Browse files Browse the repository at this point in the history
…of-logical]
  • Loading branch information
eugenegff committed Oct 5, 2023
1 parent d26475c commit 7f381c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions OgreMain/src/OgreRootLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ namespace Ogre
}
}

const bool texTypesInUse = mDescBindingRanges[i][DescBindingTypes::TexBuffer].isInUse() |
mDescBindingRanges[i][DescBindingTypes::Texture].isInUse();
const bool texTypesInUse =
(int)mDescBindingRanges[i][DescBindingTypes::TexBuffer].isInUse() |
(int)mDescBindingRanges[i][DescBindingTypes::Texture].isInUse();
if( texTypesInUse )
{
if( !bakedSetsSeenTexTypes )
Expand Down Expand Up @@ -253,8 +254,9 @@ namespace Ogre
}
}

const bool uavTypesInUse = mDescBindingRanges[i][DescBindingTypes::UavBuffer].isInUse() |
mDescBindingRanges[i][DescBindingTypes::UavTexture].isInUse();
const bool uavTypesInUse =
(int)mDescBindingRanges[i][DescBindingTypes::UavBuffer].isInUse() |
(int)mDescBindingRanges[i][DescBindingTypes::UavTexture].isInUse();
if( uavTypesInUse )
{
if( !bakedSetsSeenUavTypes )
Expand Down
12 changes: 6 additions & 6 deletions RenderSystems/Vulkan/src/OgreVulkanRootLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,13 @@ namespace Ogre
}
else
{
bDirty |=
table.dirtyBakedTextures & ( ranges[DescBindingTypes::ReadOnlyBuffer].isInUse() |
ranges[DescBindingTypes::TexBuffer].isInUse() |
ranges[DescBindingTypes::Texture].isInUse() );
bDirty |= table.dirtyBakedTextures &
( (int)ranges[DescBindingTypes::ReadOnlyBuffer].isInUse() |
(int)ranges[DescBindingTypes::TexBuffer].isInUse() |
(int)ranges[DescBindingTypes::Texture].isInUse() );
bDirty |= table.dirtyBakedSamplers & ranges[DescBindingTypes::Sampler].isInUse();
bDirty |= table.dirtyBakedUavs & ( ranges[DescBindingTypes::UavBuffer].isInUse() |
ranges[DescBindingTypes::UavTexture].isInUse() );
bDirty |= table.dirtyBakedUavs & ( (int)ranges[DescBindingTypes::UavBuffer].isInUse() |
(int)ranges[DescBindingTypes::UavTexture].isInUse() );
}

if( bDirty )
Expand Down

0 comments on commit 7f381c6

Please sign in to comment.