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}
diff --git a/modules/desktop_capture/win/desktop.cc b/modules/desktop_capture/win/desktop.cc
index 4fdf266..4a671dd 100644
--- a/modules/desktop_capture/win/desktop.cc
+++ b/modules/desktop_capture/win/desktop.cc
@@ -13,6 +13,7 @@
#include <vector>
#include "rtc_base/logging.h"
+#include "rtc_base/string_utils.h"
namespace webrtc {
@@ -77,8 +78,8 @@
DESKTOP_SWITCHDESKTOP | GENERIC_WRITE;
HDESK desktop = OpenDesktopW(desktop_name, 0, FALSE, desired_access);
if (desktop == NULL) {
- RTC_LOG(LS_ERROR) << "Failed to open the desktop '" << desktop_name
- << "': " << GetLastError();
+ RTC_LOG(LS_ERROR) << "Failed to open the desktop '"
+ << rtc::ToUtf8(desktop_name) << "': " << GetLastError();
return NULL;
}