[Base] LaunchWebBrowser now takes a string view.

This commit is contained in:
gibbed
2021-06-28 12:22:13 -05:00
committed by Rick Gibbed
parent e84ef132ae
commit a12f775c23
3 changed files with 7 additions and 6 deletions

View File

@@ -13,9 +13,9 @@
namespace xe {
void LaunchWebBrowser(const std::string& url) {
auto temp = xe::to_utf16(url);
ShellExecuteW(nullptr, L"open", reinterpret_cast<LPCWSTR>(temp.c_str()),
void LaunchWebBrowser(const std::string_view url) {
auto wide_url = xe::to_utf16(url);
ShellExecuteW(nullptr, L"open", reinterpret_cast<LPCWSTR>(wide_url.c_str()),
nullptr, nullptr, SW_SHOWNORMAL);
}