Move nUnicode variable to for loop condition statement.

Use nUnicode directly in range based loop condition statement
instead of declaring seperately in loop body.

Change-Id: I07d8fb7a693909e0cf43ae0562547c51d001eb14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156936
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Adam Seskunas 2023-09-14 21:02:14 -07:00 committed by Mike Kaganski
parent b3fdd999f8
commit d039fcd1cc

View file

@ -214,9 +214,8 @@ void EscherPropertyContainer::AddOpt(
std::vector<sal_uInt8> aBuf;
aBuf.reserve(rString.size() * 2 + 2);
for(const auto& nChar: rString)
for(const sal_Unicode nUnicode: rString)
{
const sal_Unicode nUnicode(nChar);
aBuf.push_back(static_cast<sal_uInt8>(nUnicode));
aBuf.push_back(static_cast<sal_uInt8>(nUnicode >> 8));
}