Bug 996738 - Change #define to const int to work better with unified builds. r=mattwoodrow
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 15 Apr 2014 10:58:00 +0200
changeset 197260 c724358ef43f69356318292ea6346e102b7a3468
parent 197259 5d7dd6086a5a78f283cdf7f979395cd5cb357c25
child 197261 08727079d2402b95c5dc7fc9694c50a6f194500c
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs996738
milestone31.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 996738 - Change #define to const int to work better with unified builds. r=mattwoodrow
gfx/layers/LayerSorter.cpp
--- a/gfx/layers/LayerSorter.cpp
+++ b/gfx/layers/LayerSorter.cpp
@@ -148,35 +148,35 @@ static LayerSortOrder CompareDepth(Layer
   } else {
     return BBeforeA;
   }
 }
 
 #ifdef DEBUG
 static bool gDumpLayerSortList = getenv("MOZ_DUMP_LAYER_SORT_LIST") != 0;
 
-#define BLACK       0
-#define RED         1
-#define GREEN       2
-#define YELLOW      3
-#define BLUE        4
-#define MAGENTA     5
-#define CYAN        6
-#define WHITE       7
+static const int BLACK = 0;
+static const int RED = 1;
+static const int GREEN = 2;
+static const int YELLOW = 3;
+static const int BLUE = 4;
+static const int MAGENTA = 5;
+static const int CYAN = 6;
+static const int WHITE = 7;
 
 //#define USE_XTERM_COLORING
 #ifdef USE_XTERM_COLORING
 
-#define RESET       0
-#define BRIGHT      1
-#define DIM         2
-#define UNDERLINE   3
-#define BLINK       4
-#define REVERSE     7
-#define HIDDEN      8
+static const int RESET = 0;
+static const int BRIGHT = 1;
+static const int DIM = 2;
+static const int UNDERLINE = 3;
+static const int BLINK = 4;
+static const int REVERSE = 7;
+static const int HIDDEN = 8;
 
 static void SetTextColor(uint32_t aColor)
 {
   char command[13];
 
   /* Command is the control command to the terminal */
   sprintf(command, "%c[%d;%d;%dm", 0x1B, RESET, aColor + 30, BLACK + 40);
   printf("%s", command);