From 9e9ad2d44942c44a2f0399ca775d740bf929dd21 Mon Sep 17 00:00:00 2001 From: Eugene Golushkov Date: Wed, 4 Sep 2024 20:02:56 +0200 Subject: [PATCH] fixed "your comparator is not valid strict ordering" --- OgreMain/include/OgreConstBufferPool.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OgreMain/include/OgreConstBufferPool.h b/OgreMain/include/OgreConstBufferPool.h index 699416eda8b..accf707bfe0 100644 --- a/OgreMain/include/OgreConstBufferPool.h +++ b/OgreMain/include/OgreConstBufferPool.h @@ -188,7 +188,9 @@ namespace Ogre inline bool OrderConstBufferPoolUserByPoolThenSlot( const ConstBufferPoolUser *_l, const ConstBufferPoolUser *_r ) { - return _l->mAssignedPool < _r->mAssignedPool && _l->mAssignedSlot < _r->mAssignedSlot; + if( _l->mAssignedPool != _r->mAssignedPool ) + return _l->mAssignedPool < _r->mAssignedPool; + return _l->mAssignedSlot < _r->mAssignedSlot; } /** @} */