Merge "Get rid of some C artifacts as noted in the initial review." into dalvik-dev
diff --git a/src/reference_table.cc b/src/reference_table.cc
index 3f0c5d5..df908af 100644
--- a/src/reference_table.cc
+++ b/src/reference_table.cc
@@ -46,10 +46,8 @@
   }
 }
 
-/*
- * If "obj" is an array, return the number of elements in the array.
- * Otherwise, return zero.
- */
+// If "obj" is an array, return the number of elements in the array.
+// Otherwise, return zero.
 size_t GetElementCount(const Object* obj) {
   if (obj == NULL || obj == kClearedJniWeakGlobal || !obj->IsArray()) {
     return 0;
@@ -90,13 +88,11 @@
   }
 };
 
-/*
- * Log an object with some additional info.
- *
- * Pass in the number of elements in the array (or 0 if this is not an
- * array object), and the number of additional objects that are identical
- * or equivalent to the original.
- */
+// Log an object with some additional info.
+//
+// Pass in the number of elements in the array (or 0 if this is not an
+// array object), and the number of additional objects that are identical
+// or equivalent to the original.
 void LogSummaryLine(const Object* obj, size_t elems, int identical, int equiv) {
   if (obj == NULL) {
     LOG(WARNING) << "    NULL reference (count=" << equiv << ")";
@@ -129,12 +125,10 @@
   return entries_.size();
 }
 
-/*
- * Dump a summary of an array of references to the log file.
- *
- * This is used to dump the contents of ReferenceTable and IndirectRefTable
- * structs.
- */
+// Dump a summary of an array of references to the log file.
+//
+// This is used to dump the contents of ReferenceTable and IndirectRefTable
+// structs.
 void ReferenceTable::Dump() const {
   LOG(WARNING) << name_ << " reference table dump:";
 
diff --git a/src/reference_table.h b/src/reference_table.h
index 140cc37..1181304 100644
--- a/src/reference_table.h
+++ b/src/reference_table.h
@@ -26,15 +26,13 @@
 
 class Object;
 
-#define kInvalidIndirectRefObject reinterpret_cast<Object*>(0xdead4321)
-#define kClearedJniWeakGlobal reinterpret_cast<Object*>(0xdead1234)
+static const Object* const kInvalidIndirectRefObject = reinterpret_cast<Object*>(0xdead4321);
+static const Object* const kClearedJniWeakGlobal = reinterpret_cast<Object*>(0xdead1234);
 
-/*
- * Maintain a table of references.  Used for internal local references,
- * JNI monitor references, and JNI pinned array references.
- *
- * None of the functions are synchronized.
- */
+// Maintain a table of references.  Used for internal local references,
+// JNI monitor references, and JNI pinned array references.
+//
+// None of the functions are synchronized.
 class ReferenceTable {
  public:
   ReferenceTable(const char* name, size_t initial_size, size_t max_size);