C++'ification of Quick compiler's casts

 o Eliminate old useless LIR casts.
 o Replace remaining C-style casts with new C++ versions.
 o Unified instruction encoding enum
 o Expand usage of the auto-generated ostream helpers for enum LOG messages.
 o Replaced all usages of intptr_t with uintptr_t.
 o Fixed bug in removeRedundantBranches, and moved to common code

Change-Id: I53211c0de1be913f958c8fde915296ac08345b7e
diff --git a/src/compiler/ralloc.cc b/src/compiler/ralloc.cc
index ffb7fec..34edb51 100644
--- a/src/compiler/ralloc.cc
+++ b/src/compiler/ralloc.cc
@@ -410,8 +410,8 @@
   RegLocation* loc;
 
   /* Allocate the location map */
-  loc = (RegLocation*)oatNew(cUnit, cUnit->numSSARegs * sizeof(*loc), true,
-                             kAllocRegAlloc);
+  loc = static_cast<RegLocation*>(oatNew(cUnit, cUnit->numSSARegs * sizeof(*loc),
+                                  true, kAllocRegAlloc));
   for (i=0; i< cUnit->numSSARegs; i++) {
     loc[i] = freshLoc;
     loc[i].sRegLow = i;
@@ -422,7 +422,7 @@
   loc[cUnit->methodSReg].location = kLocCompilerTemp;
   loc[cUnit->methodSReg].defined = true;
   for (i = 0; i < cUnit->numCompilerTemps; i++) {
-    CompilerTemp* ct = (CompilerTemp*)cUnit->compilerTemps.elemList[i];
+    CompilerTemp* ct = reinterpret_cast<CompilerTemp*>(cUnit->compilerTemps.elemList[i]);
     loc[ct->sReg].location = kLocCompilerTemp;
     loc[ct->sReg].defined = true;
   }
@@ -431,10 +431,9 @@
 
   /* Allocation the promotion map */
   int numRegs = cUnit->numDalvikRegisters;
-  cUnit->promotionMap =
-      (PromotionMap*)oatNew(cUnit, (numRegs + cUnit->numCompilerTemps + 1) *
-                            sizeof(cUnit->promotionMap[0]), true,
-                            kAllocRegAlloc);
+  cUnit->promotionMap = static_cast<PromotionMap*>
+      (oatNew(cUnit, (numRegs + cUnit->numCompilerTemps + 1) * sizeof(cUnit->promotionMap[0]),
+              true, kAllocRegAlloc));
 
   /* Add types of incoming arguments based on signature */
   int numIns = cUnit->numIns;