diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-31 20:39:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-31 22:03:42 +0200 |
commit | b19a2dfafa366f5fea1b70a1bae2d39a76a54a8e (patch) | |
tree | c8d5a651be9c72a9d3553226ee2e6e9b20914839 /basic | |
parent | 4c60697daaecc8be0a00e900ba1b4b62713e43df (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/image.cxx | 4 | ||||
-rw-r--r-- | basic/source/inc/image.hxx | 3 |
2 files changed, 4 insertions, 3 deletions
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 |