Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2472)

Unified Diff: runtime/vm/raw_object.cc

Issue 1526123002: VM: Const-correctness fixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/runtime_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/runtime_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698