Bug 1151541, part 3 - Fix leading tabs in xpcom/. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Thu, 09 Apr 2015 10:25:05 -0700
changeset 238382 6ba780f5190eaa746f2012e06e3d59fb6f6ae7ba
parent 238381 2328731ef45354daf50eb21607a3c781ab79bc7c
child 238383 47e8516e73979e07e9b115326911a755c166229b
push id58205
push useramccreight@mozilla.com
push dateThu, 09 Apr 2015 17:25:20 +0000
treeherdermozilla-inbound@6ba780f5190e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1151541
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1151541, part 3 - Fix leading tabs in xpcom/. r=froydnj
xpcom/build/ServiceList.h
xpcom/io/nsLinebreakConverter.cpp
xpcom/tests/gtest/TestCRT.cpp
--- a/xpcom/build/ServiceList.h
+++ b/xpcom/build/ServiceList.h
@@ -32,17 +32,17 @@ MOZ_SERVICE(InDOMUtils, inIDOMUtils,
             "@mozilla.org/inspector/dom-utils;1")
 MOZ_SERVICE(PermissionManager, nsIPermissionManager,
             "@mozilla.org/permissionmanager;1");
 MOZ_SERVICE(ServiceWorkerManager, nsIServiceWorkerManager,
             "@mozilla.org/serviceworkers/manager;1");
 MOZ_SERVICE(AsyncShutdown, nsIAsyncShutdownService,
             "@mozilla.org/async-shutdown-service;1")
 MOZ_SERVICE(UUIDGenerator, nsIUUIDGenerator,
-	    "@mozilla.org/uuid-generator;1");
+            "@mozilla.org/uuid-generator;1");
 
 #ifdef MOZ_USE_NAMESPACE
 namespace mozilla {
 #endif
 
 MOZ_SERVICE(HistoryService, IHistory,
             "@mozilla.org/browser/history;1")
 
--- a/xpcom/io/nsLinebreakConverter.cpp
+++ b/xpcom/io/nsLinebreakConverter.cpp
@@ -6,19 +6,19 @@
 
 #include "nsLinebreakConverter.h"
 
 #include "nsMemory.h"
 #include "nsCRT.h"
 
 
 /*----------------------------------------------------------------------------
-	GetLinebreakString
+  GetLinebreakString
 
-	Could make this inline
+  Could make this inline
 ----------------------------------------------------------------------------*/
 static const char*
 GetLinebreakString(nsLinebreakConverter::ELinebreakType aBreakType)
 {
   static const char* const sLinebreaks[] = {
     "",             // any
     NS_LINEBREAK,   // platform
     LFSTR,          // content
@@ -30,35 +30,35 @@ GetLinebreakString(nsLinebreakConverter:
     nullptr
   };
 
   return sLinebreaks[aBreakType];
 }
 
 
 /*----------------------------------------------------------------------------
-	AppendLinebreak
+  AppendLinebreak
 
-	Wee inline method to append a line break. Modifies ioDest.
+  Wee inline method to append a line break. Modifies ioDest.
 ----------------------------------------------------------------------------*/
 template<class T>
 void
 AppendLinebreak(T*& aIoDest, const char* aLineBreakStr)
 {
   *aIoDest++ = *aLineBreakStr;
 
   if (aLineBreakStr[1]) {
     *aIoDest++ = aLineBreakStr[1];
   }
 }
 
 /*----------------------------------------------------------------------------
-	CountChars
+  CountChars
 
-	Counts occurrences of breakStr in aSrc
+  Counts occurrences of breakStr in aSrc
 ----------------------------------------------------------------------------*/
 template<class T>
 int32_t
 CountLinebreaks(const T* aSrc, int32_t aInLen, const char* aBreakStr)
 {
   const T* src = aSrc;
   const T* srcEnd = aSrc + aInLen;
   int32_t theCount = 0;
@@ -80,19 +80,19 @@ CountLinebreaks(const T* aSrc, int32_t a
     }
   }
 
   return theCount;
 }
 
 
 /*----------------------------------------------------------------------------
-	ConvertBreaks
+  ConvertBreaks
 
-	ioLen *includes* a terminating null, if any
+  ioLen *includes* a terminating null, if any
 ----------------------------------------------------------------------------*/
 template<class T>
 static T*
 ConvertBreaks(const T* aInSrc, int32_t& aIoLen, const char* aSrcBreak,
               const char* aDestBreak)
 {
   NS_ASSERTION(aInSrc && aSrcBreak && aDestBreak, "Got a null string");
 
@@ -265,17 +265,17 @@ ConvertUnknownBreaks(const T* aInSrc, in
   }
 
   aIoLen = finalLen;
   return resultString;
 }
 
 
 /*----------------------------------------------------------------------------
-	ConvertLineBreaks
+  ConvertLineBreaks
 
 ----------------------------------------------------------------------------*/
 char*
 nsLinebreakConverter::ConvertLineBreaks(const char* aSrc,
                                         ELinebreakType aSrcBreaks,
                                         ELinebreakType aDestBreaks,
                                         int32_t aSrcLen, int32_t* aOutLen)
 {
@@ -299,17 +299,17 @@ nsLinebreakConverter::ConvertLineBreaks(
   if (aOutLen) {
     *aOutLen = sourceLen;
   }
   return resultString;
 }
 
 
 /*----------------------------------------------------------------------------
-	ConvertLineBreaksInSitu
+  ConvertLineBreaksInSitu
 
 ----------------------------------------------------------------------------*/
 nsresult
 nsLinebreakConverter::ConvertLineBreaksInSitu(char** aIoBuffer,
                                               ELinebreakType aSrcBreaks,
                                               ELinebreakType aDestBreaks,
                                               int32_t aSrcLen, int32_t* aOutLen)
 {
@@ -352,17 +352,17 @@ nsLinebreakConverter::ConvertLineBreaksI
     }
   }
 
   return NS_OK;
 }
 
 
 /*----------------------------------------------------------------------------
-	ConvertUnicharLineBreaks
+  ConvertUnicharLineBreaks
 
 ----------------------------------------------------------------------------*/
 char16_t*
 nsLinebreakConverter::ConvertUnicharLineBreaks(const char16_t* aSrc,
                                                ELinebreakType aSrcBreaks,
                                                ELinebreakType aDestBreaks,
                                                int32_t aSrcLen,
                                                int32_t* aOutLen)
@@ -386,17 +386,17 @@ nsLinebreakConverter::ConvertUnicharLine
   if (aOutLen) {
     *aOutLen = bufLen;
   }
   return resultString;
 }
 
 
 /*----------------------------------------------------------------------------
-	ConvertStringLineBreaks
+  ConvertStringLineBreaks
 
 ----------------------------------------------------------------------------*/
 nsresult
 nsLinebreakConverter::ConvertUnicharLineBreaksInSitu(
     char16_t** aIoBuffer, ELinebreakType aSrcBreaks, ELinebreakType aDestBreaks,
     int32_t aSrcLen, int32_t* aOutLen)
 {
   NS_ASSERTION(aIoBuffer && *aIoBuffer, "Null pointer passed");
@@ -437,17 +437,17 @@ nsLinebreakConverter::ConvertUnicharLine
       *aOutLen = sourceLen;
     }
   }
 
   return NS_OK;
 }
 
 /*----------------------------------------------------------------------------
-	ConvertStringLineBreaks
+  ConvertStringLineBreaks
 
 ----------------------------------------------------------------------------*/
 nsresult
 nsLinebreakConverter::ConvertStringLineBreaks(nsString& aIoString,
                                               ELinebreakType aSrcBreaks,
                                               ELinebreakType aDestBreaks)
 {
 
--- a/xpcom/tests/gtest/TestCRT.cpp
+++ b/xpcom/tests/gtest/TestCRT.cpp
@@ -10,24 +10,25 @@
 #include <stdlib.h>
 #include "gtest/gtest.h"
 
 namespace TestCRT {
 
 // The return from strcmp etc is only defined to be postive, zero or
 // negative. The magnitude of a non-zero return is irrelevant.
 int sign(int val) {
-    if (val == 0)
-	return 0;
-    else {
-	if (val > 0)
-	    return 1;
-	else
-	    return -1;
+  if (val == 0) {
+    return 0;
+  } else {
+    if (val > 0) {
+      return 1;
+    } else {
+      return -1;
     }
+  }
 }
 
 
 // Verify that nsCRT versions of string comparison routines get the
 // same answers as the native non-unicode versions. We only pass in
 // iso-latin-1 strings, so the comparison must be valid.
 static void Check(const char* s1, const char* s2, int n)
 {