Backed out changeset ff5de50c1333 (bug 958596)
authorEd Morley <emorley@mozilla.com>
Tue, 25 Feb 2014 17:17:16 +0000
changeset 170774 01397db391d4b656e538c5daf5cd27d7cee30aa1
parent 170773 10054e48553cb73696e086646784a04f04c6e8ac
child 170775 bb2e06a379c3c7964c79eeb04edd804571481656
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs958596
milestone30.0a1
backs outff5de50c1333a318bd27308b95d5c9e160de59ae
Backed out changeset ff5de50c1333 (bug 958596)
gfx/2d/Logging.h
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -9,17 +9,16 @@
 #include <string>
 #include <sstream>
 #include <stdio.h>
 
 #include "nsDebug.h"
 #include "Point.h"
 #include "BaseRect.h"
 #include "Matrix.h"
-#include "mozilla/TypedEnum.h"
 
 #ifdef WIN32
 // This file gets included from nsGlobalWindow.cpp, which doesn't like
 // having windows.h included in it. Since OutputDebugStringA is the only
 // thing we need from windows.h, we just declare it here directly.
 // Note: the function's documented signature is
 //  WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR lpOutputString)
 // but if we don't include windows.h, the macros WINBASEAPI, WINAPI, and 
@@ -76,30 +75,22 @@ class NoLog
 public:
   NoLog() {}
   ~NoLog() {}
 
   template<typename T>
   NoLog &operator <<(const T &aLogText) { return *this; }
 };
 
-MOZ_BEGIN_ENUM_CLASS(LogOptions, int)
-  NoNewline = 0x01
-MOZ_END_ENUM_CLASS(LogOptions)
-
 template<int L>
 class Log
 {
 public:
-  Log(LogOptions aOptions = LogOptions(0)) : mOptions(aOptions) {}
-  ~Log() {
-    if (!(int(mOptions) & int(LogOptions::NoNewline)))
-      mMessage << '\n';
-    WriteLog(mMessage.str());
-  }
+  Log() {}
+  ~Log() { mMessage << '\n'; WriteLog(mMessage.str()); }
 
   Log &operator <<(char aChar) { mMessage << aChar; return *this; }
   Log &operator <<(const std::string &aLogText) { mMessage << aLogText; return *this; }
   Log &operator <<(const char aStr[]) { mMessage << static_cast<const char*>(aStr); return *this; }
   Log &operator <<(bool aBool) { mMessage << (aBool ? "true" : "false"); return *this; }
   Log &operator <<(int aInt) { mMessage << aInt; return *this; }
   Log &operator <<(unsigned int aInt) { mMessage << aInt; return *this; }
   Log &operator <<(long aLong) { mMessage << aLong; return *this; }
@@ -121,17 +112,16 @@ public:
 
 private:
 
   void WriteLog(const std::string &aString) {
     OutputMessage(aString, L);
   }
 
   std::stringstream mMessage;
-  LogOptions mOptions;
 };
 
 typedef Log<LOG_DEBUG> DebugLog;
 typedef Log<LOG_WARNING> WarningLog;
 
 #ifdef GFX_LOG_DEBUG
 #define gfxDebug DebugLog
 #else