Stop to define DISALLOW_EVIL_CONSTRUCTORS to avoid name conflict.
author <shinichiro.hamaji@gmail.com> <>
Mon, 3 Nov 2008 05:00:04 +0000 (05:00 +0000)
committer <shinichiro.hamaji@gmail.com> <>
Mon, 3 Nov 2008 05:00:04 +0000 (05:00 +0000)
git-svn-id: https://google-glog.googlecode.com/svn/trunk@13 eb4d4688-79bd-11dd-afb4-1d65580434c0

src/glog/logging.h.in

index 5d81861..e982553 100644 (file)
@@ -94,12 +94,6 @@ typedef __uint64 uint64;
 #endif
 #endif
 
-// A macro to disallow the evil copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-#define DISALLOW_EVIL_CONSTRUCTORS(TypeName)    \
-  TypeName(const TypeName&);                    \
-  void operator=(const TypeName&)
-
 // Make a bunch of macros for logging.  The way to log things is to stream
 // things to LOG(<a particular severity level>).  E.g.,
 //
@@ -980,7 +974,8 @@ private:
     ~LogMessageData();
 
    private:
-    DISALLOW_EVIL_CONSTRUCTORS(LogMessageData);
+    LogMessageData(const LogMessageData&);
+    void operator=(const LogMessageData&);
   };
 
   LogMessageData* allocated_;
@@ -988,7 +983,8 @@ private:
 
   friend class LogDestination;
 
-  DISALLOW_EVIL_CONSTRUCTORS(LogMessage);
+  LogMessage(const LogMessage&);
+  void operator=(const LogMessage&);
 };
 
 // This class happens to be thread-hostile because all instances share
@@ -1033,8 +1029,8 @@ class ErrnoLogMessage : public LogMessage {
   ~ErrnoLogMessage();
 
  private:
-
-  DISALLOW_EVIL_CONSTRUCTORS(ErrnoLogMessage);
+  ErrnoLogMessage(const ErrnoLogMessage&);
+  void operator=(const ErrnoLogMessage&);
 };
 
 
@@ -1305,9 +1301,6 @@ void InstallFailureSignalHandler();
 // terminated with '\0'.
 void InstallFailureWriter(void (*writer)(const char* data, int size));
 
-// Undefine these macros not to taint namespace.
-#undef DISALLOW_EVIL_CONSTRUCTORS
-
 @ac_google_end_namespace@
 
 #endif // _LOGGING_H_