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

Unified Diff: runtime/vm/flags.cc

Issue 1462953002: VM: Make more globals constant where easily possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unnecessary const_cast Created 5 years, 1 month 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/bin/vmservice_impl.cc ('k') | runtime/vm/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flags.cc
diff --git a/runtime/vm/flags.cc b/runtime/vm/flags.cc
index f38639fff5b42563b23876e1a247c8ca56735a0b..c1ec041c7284e60fecd3a8a868a952ed979fc205 100644
--- a/runtime/vm/flags.cc
+++ b/runtime/vm/flags.cc
@@ -288,8 +288,8 @@ void Flags::Parse(const char* option) {
if (*equals != '=') {
// No explicit option argument. Determine if there is a "no_" prefix
// preceding the name.
- const char* kNo1Prefix = "no_";
- const char* kNo2Prefix = "no-";
+ const char* const kNo1Prefix = "no_";
+ const char* const kNo2Prefix = "no-";
const intptr_t kNo1PrefixLen = strlen(kNo1Prefix);
const intptr_t kNo2PrefixLen = strlen(kNo2Prefix);
if (strncmp(option, kNo1Prefix, kNo1PrefixLen) == 0) {
@@ -359,7 +359,7 @@ bool Flags::ProcessCommandLineFlags(int number_of_vm_flags,
qsort(flags_, num_flags_, sizeof flags_[0], CompareFlagNames);
- const char* kPrefix = "--";
+ const char* const kPrefix = "--";
const intptr_t kPrefixLen = strlen(kPrefix);
int i = 0;
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/vm/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698