Skip to content

Commit

Permalink
Another xcode 12.2/macos 10.13 build fix: no optional.value()
Browse files Browse the repository at this point in the history
  • Loading branch information
warmenhoven committed Feb 1, 2023
1 parent a0e8664 commit 5682924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Commands/CDirectiveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void CDirectiveData::encodeSjis()
if (auto unicodeValue = sjisToUnicode(SJISValue))
{
hexBuffer[0] = SJISValue & 0xFF;
sjisTable.addEntry(hexBuffer, 1, convertUnicodeCharToUtf8(unicodeValue.value()));
sjisTable.addEntry(hexBuffer, 1, convertUnicodeCharToUtf8(*unicodeValue));
}
}
for (unsigned short SJISValue = 0x8100; SJISValue < 0xEF00; SJISValue++)
Expand All @@ -218,7 +218,7 @@ void CDirectiveData::encodeSjis()
{
hexBuffer[0] = (SJISValue >> 8) & 0xFF;
hexBuffer[1] = SJISValue & 0xFF;
sjisTable.addEntry(hexBuffer, 2, convertUnicodeCharToUtf8(unicodeValue.value()));
sjisTable.addEntry(hexBuffer, 2, convertUnicodeCharToUtf8(*unicodeValue));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Util/FileClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ char32_t TextFile::readCharacter()
sjis = (sjis << 8) | bufGetChar();

if (auto unicode = sjisToUnicode(sjis))
value = unicode.value();
value = *unicode;
else
errorText = tfm::format("One or more invalid Shift-JIS characters in this file");
}
Expand Down

0 comments on commit 5682924

Please sign in to comment.