diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_message_utils.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 <class P> static inline void WriteParam(Message* m, const P& p) { typedef typename SimilarTypeTraits<P>::Type Type; - ParamTraits<Type>::Write(m, static_cast<const Type& >(p)); + const Type& t = p; + ParamTraits<Type>::Write(m, t); } template <class P> @@ -125,7 +126,8 @@ static inline bool WARN_UNUSED_RESULT ReadParam(const Message* m, void** iter, template <class P> static inline void LogParam(const P& p, std::wstring* l) { typedef typename SimilarTypeTraits<P>::Type Type; - ParamTraits<Type>::Log(static_cast<const Type& >(p), l); + const Type& t = p; + ParamTraits<Type>::Log(t, l); } template <> |