[unicode] Use unicode when dealing with chars - Part 2

This commit is contained in:
Léa Saviot
2019-01-29 16:51:28 +01:00
committed by Émilie Feral
parent 68db4620ba
commit a214bbdc5a
20 changed files with 186 additions and 127 deletions

View File

@@ -200,11 +200,11 @@ bool VariableBoxController::selectLeaf(int selectedRow) {
if (m_currentPage == Page::Function) {
// Add parentheses to a function name
assert(nameLength < nameToHandleMaxSize);
nameToHandle[nameLength++] = '(';
nameLength += UTF8Decoder::CodePointToChars('(', nameToHandle+nameLength, nameToHandleMaxSize - nameLength);
assert(nameLength < nameToHandleMaxSize);
nameLength+= UTF8Decoder::CodePointToChars(UCodePointEmpty, nameToHandle+nameLength, nameToHandleMaxSize - nameLength);
assert(nameLength < nameToHandleMaxSize);
nameToHandle[nameLength++] = ')';
nameLength += UTF8Decoder::CodePointToChars(')', nameToHandle+nameLength, nameToHandleMaxSize - nameLength);
assert(nameLength < nameToHandleMaxSize);
nameToHandle[nameLength] = 0;
}