Skip to content

Commit

Permalink
Overlay: store zorder as ushort instead of ulong
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Dec 10, 2023
1 parent b1ea4c8 commit d30531e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Components/Overlay/include/OgreOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace Ogre {
mutable Matrix4 mTransform;
mutable bool mTransformOutOfDate;
bool mTransformUpdated;
ulong mZOrder;
ushort mZOrder;
bool mVisible;
bool mInitialised;
String mOrigin;
Expand Down
4 changes: 2 additions & 2 deletions Components/Overlay/src/OgreOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace Ogre {
//---------------------------------------------------------------------
void Overlay::assignZOrders()
{
ushort zorder = static_cast<ushort>(mZOrder * 100.0f);
ushort zorder = mZOrder * ushort(100);

// Notify attached 2D elements
for (auto *e : m2DElements)
Expand All @@ -90,7 +90,7 @@ namespace Ogre {
//---------------------------------------------------------------------
ushort Overlay::getZOrder(void) const
{
return (ushort)mZOrder;
return mZOrder;
}
//---------------------------------------------------------------------
bool Overlay::isVisible(void) const
Expand Down

0 comments on commit d30531e

Please sign in to comment.