From fbefacef9e136d434d5dc788d4e918bb6e3815f4 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 12 Dec 2023 09:37:32 +0300 Subject: Simplify and fix SvGlobalName comparison Its operator< (required for stl containers) was not comparing Data4. The defaulted comparison uses a different order, but that shouldn't matter. Change-Id: Id9b9d782b393866100c3e994a3902e7ce9a2676f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160607 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- tools/source/ref/globname.cxx | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'tools/source/ref') diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx index e5cee830df22..4ae220659e3c 100644 --- a/tools/source/ref/globname.cxx +++ b/tools/source/ref/globname.cxx @@ -59,27 +59,6 @@ SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj ) return rStr; } - -bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const -{ - if( m_aData.Data3 < rObj.m_aData.Data3 ) - return true; - else if( m_aData.Data3 > rObj.m_aData.Data3 ) - return false; - - if( m_aData.Data2 < rObj.m_aData.Data2 ) - return true; - else if( m_aData.Data2 > rObj.m_aData.Data2 ) - return false; - - return m_aData.Data1 < rObj.m_aData.Data1; -} - -bool SvGlobalName::operator == ( const SvGlobalName & rObj ) const -{ - return memcmp(&m_aData, &rObj.m_aData, sizeof(m_aData)) == 0; -} - void SvGlobalName::MakeFromMemory( void const * pData ) { memcpy( &m_aData, pData, sizeof( m_aData ) ); -- cgit