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

Unified Diff: components/mus/common/event_param_traits.cc

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | components/mus/demo/mus_demo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/common/event_param_traits.cc
diff --git a/components/mus/common/event_param_traits.cc b/components/mus/common/event_param_traits.cc
index bc89c6ad85d3dd22166ee92b33684c08120a55f7..761e663885965325c775fbf27a4a187035761461 100644
--- a/components/mus/common/event_param_traits.cc
+++ b/components/mus/common/event_param_traits.cc
@@ -114,16 +114,16 @@ namespace IPC {
#define WRITE_EVENT(T) \
ParamTraits<T>::Write(m, *static_cast<T*>(p.get())); \
break;
-#define READ_EVENT(T) \
- { \
- scoped_ptr<T> event(new T(type, time_stamp, flags)); \
- if (!ParamTraits<T>::Read(m, iter, event.get())) { \
- p->reset(); \
- return false; \
- } else { \
- *p = std::move(event); \
- return true; \
- } \
+#define READ_EVENT(T) \
+ { \
+ std::unique_ptr<T> event(new T(type, time_stamp, flags)); \
+ if (!ParamTraits<T>::Read(m, iter, event.get())) { \
+ p->reset(); \
+ return false; \
+ } else { \
+ *p = std::move(event); \
+ return true; \
+ } \
}
#define LOG_EVENT(T) return ParamTraits<T>::Log(*static_cast<T*>(p.get()), l);
« no previous file with comments | « no previous file | components/mus/demo/mus_demo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698