From c21e0e82db0a3e9a60940f7ceea74edb5a1c4122 Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Wed, 16 Jun 2010 18:25:37 +0000 Subject: patch git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49982 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_message_utils.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ipc') diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h index df2c6c7..f4cd245 100644 --- a/ipc/ipc_message_utils.h +++ b/ipc/ipc_message_utils.h @@ -112,7 +112,8 @@ struct SimilarTypeTraits { template static inline void WriteParam(Message* m, const P& p) { typedef typename SimilarTypeTraits

::Type Type; - ParamTraits::Write(m, static_cast(p)); + const Type& t = p; + ParamTraits::Write(m, t); } template @@ -125,7 +126,8 @@ static inline bool WARN_UNUSED_RESULT ReadParam(const Message* m, void** iter, template static inline void LogParam(const P& p, std::wstring* l) { typedef typename SimilarTypeTraits

::Type Type; - ParamTraits::Log(static_cast(p), l); + const Type& t = p; + ParamTraits::Log(t, l); } template <> -- cgit v1.1