Avoid sending wide strings to narrow streams.

This overload was removed in C++20.

Bug: chromium:1284275
Change-Id: I67a25ae23fa111e4972d1b207f1c078da13d86a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269440
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37630}
This commit is contained in:
Peter Kasting 2022-07-25 15:24:33 -07:00 committed by WebRTC LUCI CQ
parent 21e0706ddf
commit 2f1a4370d5

View File

@ -13,6 +13,7 @@
#include <vector> #include <vector>
#include "rtc_base/logging.h" #include "rtc_base/logging.h"
#include "rtc_base/string_utils.h"
namespace webrtc { namespace webrtc {
@ -77,8 +78,8 @@ Desktop* Desktop::GetDesktop(const WCHAR* desktop_name) {
DESKTOP_SWITCHDESKTOP | GENERIC_WRITE; DESKTOP_SWITCHDESKTOP | GENERIC_WRITE;
HDESK desktop = OpenDesktopW(desktop_name, 0, FALSE, desired_access); HDESK desktop = OpenDesktopW(desktop_name, 0, FALSE, desired_access);
if (desktop == NULL) { if (desktop == NULL) {
RTC_LOG(LS_ERROR) << "Failed to open the desktop '" << desktop_name RTC_LOG(LS_ERROR) << "Failed to open the desktop '"
<< "': " << GetLastError(); << rtc::ToUtf8(desktop_name) << "': " << GetLastError();
return NULL; return NULL;
} }