summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-29 10:19:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-31 18:41:42 +0100
commit20354bce87305a274c046cca39ffe8f16add2322 (patch)
tree71ff3fffc2173d0ba65a2310298501e1f024f44c /tools/source
parent020967fde86d77c362658e49e256add265806292 (diff)
Prepare for removal of non-const operator[] from Sequence in tools
Change-Id: Ifff56df8da9b0b9e4d4e96d6b09f490807e96f52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124402 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/ref/globname.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index b38bda02ab9c..fda6fafab53c 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -256,24 +256,24 @@ css::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const
{
// platform independent representation of a "GlobalName"
// maybe transported remotely
- css::uno::Sequence< sal_Int8 > aResult( 16 );
-
- aResult[ 0] = static_cast<sal_Int8>(pImp->szData.Data1 >> 24);
- aResult[ 1] = static_cast<sal_Int8>((pImp->szData.Data1 << 8 ) >> 24);
- aResult[ 2] = static_cast<sal_Int8>((pImp->szData.Data1 << 16 ) >> 24);
- aResult[ 3] = static_cast<sal_Int8>((pImp->szData.Data1 << 24 ) >> 24);
- aResult[ 4] = static_cast<sal_Int8>(pImp->szData.Data2 >> 8);
- aResult[ 5] = static_cast<sal_Int8>((pImp->szData.Data2 << 8 ) >> 8);
- aResult[ 6] = static_cast<sal_Int8>(pImp->szData.Data3 >> 8);
- aResult[ 7] = static_cast<sal_Int8>((pImp->szData.Data3 << 8 ) >> 8);
- aResult[ 8] = pImp->szData.Data4[ 0 ];
- aResult[ 9] = pImp->szData.Data4[ 1 ];
- aResult[10] = pImp->szData.Data4[ 2 ];
- aResult[11] = pImp->szData.Data4[ 3 ];
- aResult[12] = pImp->szData.Data4[ 4 ];
- aResult[13] = pImp->szData.Data4[ 5 ];
- aResult[14] = pImp->szData.Data4[ 6 ];
- aResult[15] = pImp->szData.Data4[ 7 ];
+ css::uno::Sequence< sal_Int8 > aResult{
+ /* [ 0] */ static_cast<sal_Int8>(pImp->szData.Data1 >> 24),
+ /* [ 1] */ static_cast<sal_Int8>((pImp->szData.Data1 << 8 ) >> 24),
+ /* [ 2] */ static_cast<sal_Int8>((pImp->szData.Data1 << 16 ) >> 24),
+ /* [ 3] */ static_cast<sal_Int8>((pImp->szData.Data1 << 24 ) >> 24),
+ /* [ 4] */ static_cast<sal_Int8>(pImp->szData.Data2 >> 8),
+ /* [ 5] */ static_cast<sal_Int8>((pImp->szData.Data2 << 8 ) >> 8),
+ /* [ 6] */ static_cast<sal_Int8>(pImp->szData.Data3 >> 8),
+ /* [ 7] */ static_cast<sal_Int8>((pImp->szData.Data3 << 8 ) >> 8),
+ /* [ 8] */ static_cast<sal_Int8>(pImp->szData.Data4[ 0 ]),
+ /* [ 9] */ static_cast<sal_Int8>(pImp->szData.Data4[ 1 ]),
+ /* [10] */ static_cast<sal_Int8>(pImp->szData.Data4[ 2 ]),
+ /* [11] */ static_cast<sal_Int8>(pImp->szData.Data4[ 3 ]),
+ /* [12] */ static_cast<sal_Int8>(pImp->szData.Data4[ 4 ]),
+ /* [13] */ static_cast<sal_Int8>(pImp->szData.Data4[ 5 ]),
+ /* [14] */ static_cast<sal_Int8>(pImp->szData.Data4[ 6 ]),
+ /* [15] */ static_cast<sal_Int8>(pImp->szData.Data4[ 7 ])
+ };
return aResult;
}