Index: runtime/vm/raw_object.cc |
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc |
index 74013a6d5474f84e74143baf56aa710b0022a27f..ba53d37e4761b6fd03ec9b4e167dbda8a08a5dfd 100644 |
--- a/runtime/vm/raw_object.cc |
+++ b/runtime/vm/raw_object.cc |
@@ -165,7 +165,7 @@ intptr_t RawObject::SizeFromClass() const { |
break; |
} |
case kFreeListElement: { |
- uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); |
+ uword addr = RawObject::ToAddr(this); |
FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); |
instance_size = element->Size(); |
break; |
@@ -277,7 +277,7 @@ intptr_t RawObject::VisitPointers(ObjectPointerVisitor* visitor) { |
} |
#undef RAW_VISITPOINTERS |
case kFreeListElement: { |
- uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); |
+ uword addr = RawObject::ToAddr(this); |
FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); |
size = element->Size(); |
break; |
@@ -303,7 +303,7 @@ intptr_t RawObject::VisitPointers(ObjectPointerVisitor* visitor) { |
bool RawObject::FindObject(FindObjectVisitor* visitor) { |
ASSERT(visitor != NULL); |
- return visitor->FindObject(const_cast<RawObject*>(this)); |
+ return visitor->FindObject(this); |
} |