tools/source/ref/globname.cxx |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 20354bce87305a274c046cca39ffe8f16add2322
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 29 10:19:16 2021 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Oct 31 18:41:42 2021 +0100

    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.kagan...@collabora.com>

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;
 }

Reply via email to