diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-07-17 06:56:01 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-07-19 17:12:32 +0200 |
commit | c1edceb2f3c9ce8065db3f0a7635e0276cb8434e (patch) | |
tree | 1285159606ccfc769683aee0d2eaac71e289b610 /basic | |
parent | c11223393c559e1182d5da2ab007151c2e7a5730 (diff) |
sal_uInt16 to sal_Int32 with some cleanup
Change-Id: Ib6e42702dd1ce29645215114b26286f05ccc1332
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 2ea23d85d5fb..fc0a8bfdcd7b 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -322,20 +322,19 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const return aToolString; } -// Create a simple hashcode: the first six characters were evaluated. +// Create a simple hashcode: the first six characters are evaluated. sal_uInt16 SbxVariable::MakeHashCode( const OUString& rName ) { sal_uInt16 n = 0; - sal_Int32 i = 0; - sal_uInt16 nLen = rName.getLength(); + sal_Int32 nLen = rName.getLength(); if( nLen > 6 ) { nLen = 6; } - while( nLen-- ) + for( sal_Int32 i=0; i<nLen; ++i ) { - sal_uInt8 c = (sal_uInt8)rName[i++]; + sal_uInt8 c = static_cast<sal_uInt8>(rName[i]); // If we have a commen sigen break!! if( c >= 0x80 ) { |