basic/source/classes/image.cxx | 4 ++-- basic/source/inc/image.hxx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit b19a2dfafa366f5fea1b70a1bae2d39a76a54a8e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue May 31 20:39:43 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue May 31 22:03:42 2022 +0200 Use more appropriate type for SbiImage::nStringIdx Change-Id: I1448739b373c6f7b9f5e6ee5a725fa0a129a4fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135204 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 229dc8058518..677e0a68c8f1 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -578,7 +578,7 @@ void SbiImage::MakeStrings( short nSize ) // growing in 1K-Steps void SbiImage::AddString( const OUString& r ) { - if( nStringIdx >= short(mvStringOffsets.size()) ) + if( nStringIdx >= mvStringOffsets.size() ) { bError = true; } @@ -606,7 +606,7 @@ void SbiImage::AddString( const OUString& r ) memcpy( pStrings.get() + nStringOff, r.getStr(), len * sizeof( sal_Unicode ) ); nStringOff = nStringOff + len; // Last String? The update the size of the buffer - if( nStringIdx >= short(mvStringOffsets.size()) ) + if( nStringIdx >= mvStringOffsets.size() ) { nStringSize = nStringOff; } diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index b33009c1e029..4bd4201a46f9 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -23,6 +23,7 @@ #include <rtl/ustring.hxx> #include "filefmt.hxx" #include <o3tl/typed_flags_set.hxx> +#include <cstddef> #include <vector> // This class reads in the image that's been produced by the compiler @@ -56,7 +57,7 @@ class SbiImage { sal_uInt16 nDimBase; // OPTION BASE value rtl_TextEncoding eCharSet; // temporary management-variable: - short nStringIdx; + std::size_t nStringIdx; sal_uInt32 nStringOff; // current Pos in the stringbuffer // routines for the compiler: void MakeStrings( short ); // establish StringPool