CLogBookScreen: Invert conditional within UpdateBodyText()

Allows unindenting the contained code by one level.
This commit is contained in:
Lioncash 2019-10-15 10:05:50 -04:00
parent b93f7a4ceb
commit 4db0e49851
1 changed files with 18 additions and 16 deletions

View File

@ -178,8 +178,11 @@ void CLogBookScreen::UpdateBodyText() {
return;
}
TCachedToken<CStringTable>& str = x1f0_curViewScans[x1c_rightSel].second;
if (str && str.IsLoaded()) {
const TCachedToken<CStringTable>& str = x1f0_curViewScans[x1c_rightSel].second;
if (!str || !str.IsLoaded()) {
return;
}
std::u16string accumStr = str->GetString(0);
if (str->GetStringCount() > 2) {
accumStr += u"\n\n";
@ -195,7 +198,6 @@ void CLogBookScreen::UpdateBodyText() {
x174_textpane_body->TextSupport().SetText(accumStr, true);
}
}
void CLogBookScreen::UpdateBodyImagesAndText() {
const CScannableObjectInfo* scan = x1f0_curViewScans[x1c_rightSel].first.GetObj();