[Scummvm-git-logs] scummvm master -> c4626eef97b6adf010db907da81dae7102c3eb77
djsrv
dservilla at gmail.com
Mon Jul 12 04:54:43 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c4626eef97 GRAPHICS: MACGUI: Fix compilation
Commit: c4626eef97b6adf010db907da81dae7102c3eb77
https://github.com/scummvm/scummvm/commit/c4626eef97b6adf010db907da81dae7102c3eb77
Author: djsrv (dservilla at gmail.com)
Date: 2021-07-12T00:54:37-04:00
Commit Message:
GRAPHICS: MACGUI: Fix compilation
Forgot to eliminate new uses of _encodeType when rebasing. As formatting
strings only use ASCII characters the encoding shouldn't really matter,
and using the default of UTF-8 is easier than fetching the actual
encoding from the relevant MacTextRun.
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index f123259ecf..84dda6b1cb 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -1199,7 +1199,7 @@ void MacText::appendTextDefault(const Common::U32String &str, bool skipAdd) {
uint oldLen = _textLines.size();
_currentFormatting = _defaultFormatting;
- Common::U32String strWithFont = Common::U32String(_defaultFormatting.toString(), _encodeType) + str;
+ Common::U32String strWithFont = Common::U32String(_defaultFormatting.toString()) + str;
if (!skipAdd) {
_str += strWithFont;
@@ -1933,7 +1933,7 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
// This happens when a long paragraph is split into several lines
#define ADDFORMATTING() \
if (formatted) { \
- formatting = Common::U32String(_textLines[i].chunks[chunk].toString(), _encodeType); \
+ formatting = Common::U32String(_textLines[i].chunks[chunk].toString()); \
if (formatting != prevformatting) { \
res += formatting; \
prevformatting = formatting; \
@@ -1941,7 +1941,7 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
}
Common::U32String MacText::getTextChunk(int startRow, int startCol, int endRow, int endCol, bool formatted, bool newlines) {
- Common::U32String res("", _encodeType);
+ Common::U32String res("");
if (endRow == -1)
endRow = _textLines.size() - 1;
@@ -1955,7 +1955,7 @@ Common::U32String MacText::getTextChunk(int startRow, int startCol, int endRow,
startRow = CLIP(startRow, 0, (int)_textLines.size() - 1);
endRow = CLIP(endRow, 0, (int)_textLines.size() - 1);
- Common::U32String formatting("", _encodeType), prevformatting("", _encodeType);
+ Common::U32String formatting(""), prevformatting("");
for (int i = startRow; i <= endRow; i++) {
// We requested only part of one line
More information about the Scummvm-git-logs
mailing list