From 1e496ce2cf63daf792393bdb2b4881c77c095319 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 7 Nov 2024 10:00:46 +0200 Subject: loplugin:passstuffbyref in forms..framework Change-Id: Ib5a013df49d532b139acd881127cfc82c7c5a6b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176190 Tested-by: Jenkins Reviewed-by: Noel Grandin --- forms/source/component/ListBox.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'forms/source/component') diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index f828a768882a..d2371e4e5a18 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1465,12 +1465,12 @@ namespace frm public: explicit ExtractStringFromSequence_Safe( const std::vector< OUString >& _rList ) : m_rList( _rList ) { } - OUString operator ()( sal_Int16 _nIndex ) + const OUString & operator ()( sal_Int16 _nIndex ) { OSL_ENSURE( _nIndex < static_cast(m_rList.size()), "ExtractStringFromSequence_Safe: inconsistence!" ); if ( _nIndex < static_cast(m_rList.size()) ) return m_rList[ _nIndex ]; - return OUString(); + return EMPTY_OUSTRING; } }; -- cgit