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

Unified Diff: webrtc/base/constructormagic.h

Issue 1316363005: Consolidate constructormagic macros with Chromium version and remove Chromium override. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 | webrtc/overrides/webrtc/base/constructormagic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/constructormagic.h
diff --git a/webrtc/base/constructormagic.h b/webrtc/base/constructormagic.h
index 6b1244fc6457e177f568d2a19c1e9e1f28502b00..7fbe51aee762b8bf27dd16ce4bb2683116577c37 100644
--- a/webrtc/base/constructormagic.h
+++ b/webrtc/base/constructormagic.h
@@ -14,16 +14,17 @@
// Undefine macros first, just in case. Some third-party includes have their own
// version.
+// Put this in the declarations for a class to be unassignable.
#undef DISALLOW_ASSIGN
#define DISALLOW_ASSIGN(TypeName) \
- void operator=(const TypeName&)
+ void operator=(const TypeName&) = delete
tommi 2015/09/07 11:15:27 nit: 4 spaces?
Henrik Grunell WebRTC 2015/09/07 11:56:40 2 spaces in base/macros.h.
-// A macro to disallow the evil copy constructor and operator= functions
-// This should be used in the private: declarations for a class.
+// A macro to disallow the copy constructor and operator= functions
+// This should be used in the private: declarations for a class
#undef DISALLOW_COPY_AND_ASSIGN
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- DISALLOW_ASSIGN(TypeName)
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
Andrew MacDonald 2015/09/07 22:45:36 Any reason not to fix this one as well? TypeName(
Henrik Grunell WebRTC 2015/09/08 11:41:09 Ah, good catch. It's like this in Chromium because
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
// A macro to disallow all the implicit constructors, namely the
// default constructor, copy constructor and operator= functions.
@@ -33,8 +34,7 @@
// especially useful for classes containing only static methods.
#undef DISALLOW_IMPLICIT_CONSTRUCTORS
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
- TypeName(); \
+ TypeName() = delete; \
DISALLOW_COPY_AND_ASSIGN(TypeName)
-
#endif // WEBRTC_BASE_CONSTRUCTORMAGIC_H_
« no previous file with comments | « no previous file | webrtc/overrides/webrtc/base/constructormagic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698