Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Unified Diff: remoting/base/dispatch_win.h.pump

Issue 413763003: clang/win: Fix most -Wwriteable-strings warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/base/dispatch_win.h.pump
diff --git a/remoting/base/dispatch_win.h.pump b/remoting/base/dispatch_win.h.pump
index c6a6d5a411affbdb7d87f0f7a087fb80ee637be9..6ef0890cb9ec18f34f4471c48bbfc37c90ecae98 100644
--- a/remoting/base/dispatch_win.h.pump
+++ b/remoting/base/dispatch_win.h.pump
@@ -128,7 +128,7 @@ $range ARG 1..ARITY
$if ARITY > 0 [[template <$for ARG , [[typename P$(ARG)]]>]]
HRESULT Invoke(IDispatch* object,
- LPOLESTR name,
+ LPCOLESTR const_name,
WORD flags,
$for ARG [[
@@ -138,8 +138,9 @@ $for ARG [[
VARIANT* const & result_out) {
// Retrieve the ID of the method to be called.
DISPID disp_id;
- HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT,
- &disp_id);
+ LPOLESTR name = const_cast<LPOLESTR>(const_name);
+ HRESULT hr = object->GetIDsOfNames(
+ IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
if (FAILED(hr))
return hr;

Powered by Google App Engine
This is Rietveld 408576698