summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-31 10:23:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-31 14:53:25 +0200
commit6f26b6aeca827329dd8d55f344e509fcf7685172 (patch)
tree1b40fbeed53250e6e874786ab1da8b93dea58580 /comphelper
parent2a263cbdaf16c723a93af020ebc11b3e07210242 (diff)
Use more appropriate type for comphelper::internal::OPropertyAccessor::nPos
Change-Id: Ia7055dcc3832002fd10ae23a35fd08df5a98ae40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/property/propagg.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index fb2db9589c8e..0d8ea6a10bb9 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -27,6 +27,7 @@
#include <o3tl/sorted_vector.hxx>
#include <typeinfo>
#include <algorithm>
+#include <cstddef>
#include <unordered_set>
#include <memory>
@@ -83,7 +84,7 @@ OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper(
std::unordered_set< sal_Int32 > existingHandles;
existingHandles.reserve( m_aProperties.size() );
sal_Int32 nAggregateHandle = _nFirstAggregateId;
- for ( sal_Int32 nMPLoop = 0; nMPLoop < static_cast< sal_Int32 >( m_aProperties.size() ); ++nMPLoop )
+ for ( std::size_t nMPLoop = 0; nMPLoop < m_aProperties.size(); ++nMPLoop )
{
auto &prop = m_aProperties[ nMPLoop ];
if ( aDelegatorProps.find( prop.Name ) != aDelegatorProps.end() )
@@ -209,7 +210,7 @@ bool OPropertyArrayAggregationHelper::fillAggregatePropertyInfoByHandle(
*_pOriginalHandle = (*i).second.nOriginalHandle;
if (_pPropName)
{
- OSL_ENSURE((*i).second.nPos < static_cast<sal_Int32>(m_aProperties.size()),"Invalid index for sequence!");
+ OSL_ENSURE((*i).second.nPos < m_aProperties.size(),"Invalid index for sequence!");
const css::beans::Property& rProperty = m_aProperties[(*i).second.nPos];
*_pPropName = rProperty.Name;
}