Skip to content

Commit

Permalink
PR nits
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Mar 9, 2023
1 parent ada3f42 commit 6dead99
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions src/cascadia/TerminalApp/AppLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ namespace winrt::TerminalApp::implementation

// These used to be in `TerminalPage::Initialized`, so that they started
// _after_ the Terminal window was started and displayed. These could
// theoretically move there again too.
// theoretically move there again too. TODO:GH#14957 - evaluate moving
// this after the Page is initialized
{
// Both LoadSettings and ReloadSettings are supposed to call this function,
// but LoadSettings skips it, so that the UI starts up faster.
Expand Down Expand Up @@ -232,7 +233,7 @@ namespace winrt::TerminalApp::implementation
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
}
};
}

_ApplyLanguageSettingChange();
_ApplyStartupTaskStateChange();
Expand Down Expand Up @@ -298,7 +299,7 @@ namespace winrt::TerminalApp::implementation

_settings = std::move(newSettings);

hr = (_warnings.size()) == 0u ? S_OK : S_FALSE;
hr = _warnings.empty() ? S_OK : S_FALSE;
}
catch (const winrt::hresult_error& e)
{
Expand Down
12 changes: 6 additions & 6 deletions src/cascadia/TerminalApp/SettingsLoadEventArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ namespace winrt::TerminalApp::implementation
public:
SettingsLoadEventArgs(bool reload,
uint64_t result,
const winrt::hstring& exceptionText,
const winrt::Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::SettingsLoadWarnings>& warnings,
const Microsoft::Terminal::Settings::Model::CascadiaSettings& newSettings) :
winrt::hstring exceptionText,
winrt::Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::SettingsLoadWarnings> warnings,
Microsoft::Terminal::Settings::Model::CascadiaSettings newSettings) :
_Reload{ reload },
_Result{ result },
_ExceptionText{ exceptionText },
_Warnings{ warnings },
_NewSettings{ newSettings } {};
_ExceptionText{ std::move(exceptionText) },
_Warnings{ std::move(warnings) },
_NewSettings{ std::move(newSettings) } {};
};
}
4 changes: 2 additions & 2 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ namespace winrt::TerminalApp::implementation
}

// If the user set a custom name, save it
if (const auto windowName = _WindowProperties.WindowName(); !windowName.empty())
if (const auto& windowName{ _WindowProperties.WindowName() }; !windowName.empty())
{
ActionAndArgs action;
action.Action(ShortcutAction::RenameWindow);
Expand Down Expand Up @@ -3927,7 +3927,7 @@ namespace winrt::TerminalApp::implementation
else if (key == Windows::System::VirtualKey::Escape)
{
// User wants to discard the changes they made
WindowRenamerTextBox().Text(WindowProperties().WindowName());
WindowRenamerTextBox().Text(_WindowProperties.WindowName());
WindowRenamer().IsOpen(false);
_renamerPressedEnter = false;
}
Expand Down

0 comments on commit 6dead99

Please sign in to comment.