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

Unified Diff: runtime/vm/profiler_service.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.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.cc
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 40b7bdc249a9739c82fe1ff4cfcd2369be4aa534..a4e6b835ce7a6fdda2704a892a7588a8ff677145 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -253,9 +253,9 @@ void ProfileCode::SetName(const char* name) {
name_ = NULL;
}
intptr_t len = strlen(name);
- name_ = Thread::Current()->zone()->Alloc<const char>(len + 1);
- strncpy(const_cast<char*>(name_), name, len);
- const_cast<char*>(name_)[len] = '\0';
+ name_ = Thread::Current()->zone()->Alloc<char>(len + 1);
+ strncpy(name_, name, len);
+ name_[len] = '\0';
}
« no previous file with comments | « runtime/vm/profiler_service.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698