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

Unified Diff: mojo/public/cpp/system/macros.h

Issue 1576283002: mojo: Remove Pass() from MOJO_MOVE_ONLY_TYPE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mojopass: morewindows Created 4 years, 11 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 | « mojo/public/cpp/bindings/lib/interface_ptr_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/macros.h
diff --git a/mojo/public/cpp/system/macros.h b/mojo/public/cpp/system/macros.h
index 212701287278e072d819c18374252598c6bd972a..d477891be4accae90f647c4666989a23f24fbfc6 100644
--- a/mojo/public/cpp/system/macros.h
+++ b/mojo/public/cpp/system/macros.h
@@ -32,16 +32,16 @@ char(&ArraySizeHelper(const T(&array)[N]))[N];
} // namespace mojo
#define MOJO_ARRAYSIZE(array) (sizeof(::mojo::internal::ArraySizeHelper(array)))
-// Used to make a type move-only. See Chromium's base/move.h for more
+// Used to make a type non-copyable. See Chromium's base/move.h for more
// details. The MoveOnlyTypeForCPP03 typedef is for Chromium's base/callback.h
-// to tell that this type is move-only.
+// to tell that this type is move-only, allowing these types to be bound or
+// passed to Callbacks.
#define MOJO_MOVE_ONLY_TYPE(type) \
private: \
type(const type&) = delete; \
void operator=(const type&) = delete; \
\
public: \
- type&& Pass() MOJO_WARN_UNUSED_RESULT { return static_cast<type&&>(*this); } \
typedef void MoveOnlyTypeForCPP03; \
\
private:
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698