From 67f40646d76d914ab7f099df25768c73c4f55bad Mon Sep 17 00:00:00 2001 From: Yuriy Solodkyy Date: Wed, 15 Mar 2017 21:55:53 -0700 Subject: Minor fix to address ?: VC conformance improvement. (#10208) Visual C++ has made some conformance changes to conditional operator that will be available under /permissive- and which make the inference of result type of the conditional operator in these 2 places ambiguous. This happens because the class type in one of the arguments provides both: the constructor from and the conversion operator to T - LCWSTR here. --- src/vm/dwreport.cpp | 2 +- src/vm/eventreporter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm/dwreport.cpp b/src/vm/dwreport.cpp index 95d717231a..b95c59ff8d 100644 --- a/src/vm/dwreport.cpp +++ b/src/vm/dwreport.cpp @@ -2468,7 +2468,7 @@ FaultReportResult DoFaultReportWorker( // Was Watson attempted, successful? { // Look for final '\' pName = wcsrchr(buf, W('\\')); // If found, skip it; if not, point to full name. - pName = pName ? pName+1 : buf; + pName = pName ? pName+1 : (LPCWSTR)buf; } } diff --git a/src/vm/eventreporter.cpp b/src/vm/eventreporter.cpp index a96c525439..c73af36b55 100644 --- a/src/vm/eventreporter.cpp +++ b/src/vm/eventreporter.cpp @@ -64,7 +64,7 @@ EventReporter::EventReporter(EventReporterType type) { // If app name has a '\', consider the part after that; otherwise consider whole name. LPCWSTR appName = wcsrchr(appPath, W('\\')); - appName = appName ? appName+1 : appPath; + appName = appName ? appName+1 : (LPCWSTR)appPath; m_Description.Append(appName); m_Description.Append(W("\n")); } -- cgit v1.2.3