mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-10 16:21:06 +00:00
Fix C2664 errors (#15714)
## Summary of the Pull Request Fix C2664 errors under latest compiler. ## References and Relevant Issues #15309 ## Detailed Description of the Pull Request / Additional comments - Latest compilers are more strict - Internal background of change: [DevDiv:1810844](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1810844) ## Validation Steps Performed - Now successfully builds under VS `17.8.0 Preview 1.0 ` - Still successfully builds under VS `17.6.5` ## PR Checklist - [x] Closes #15309 - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary) --------- Co-authored-by: Dan Albrecht <danalb@ntdev.microsoft.com>
This commit is contained in:
@@ -434,7 +434,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// environment variables, but the user might have set one in
|
||||
// the settings. Expand those here.
|
||||
|
||||
path = { wil::ExpandEnvironmentStringsW<std::wstring>(path.c_str()) };
|
||||
path = winrt::hstring{ wil::ExpandEnvironmentStringsW<std::wstring>(path.c_str()) };
|
||||
}
|
||||
|
||||
if (!path.empty())
|
||||
|
||||
@@ -906,17 +906,17 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr ||
|
||||
HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
|
||||
{
|
||||
message = { fmt::format(std::wstring_view{ RS_(L"PixelShaderNotFound") },
|
||||
(_focused ? _core.FocusedAppearance() : _core.UnfocusedAppearance()).PixelShaderPath()) };
|
||||
message = winrt::hstring{ fmt::format(std::wstring_view{ RS_(L"PixelShaderNotFound") },
|
||||
(_focused ? _core.FocusedAppearance() : _core.UnfocusedAppearance()).PixelShaderPath()) };
|
||||
}
|
||||
else if (D2DERR_SHADER_COMPILE_FAILED == hr)
|
||||
{
|
||||
message = { fmt::format(std::wstring_view{ RS_(L"PixelShaderCompileFailed") }) };
|
||||
message = winrt::hstring{ fmt::format(std::wstring_view{ RS_(L"PixelShaderCompileFailed") }) };
|
||||
}
|
||||
else
|
||||
{
|
||||
message = { fmt::format(std::wstring_view{ RS_(L"UnexpectedRendererError") },
|
||||
hr) };
|
||||
message = winrt::hstring{ fmt::format(std::wstring_view{ RS_(L"UnexpectedRendererError") },
|
||||
hr) };
|
||||
}
|
||||
|
||||
auto noticeArgs = winrt::make<NoticeEventArgs>(NoticeLevel::Warning, std::move(message));
|
||||
|
||||
Reference in New Issue
Block a user