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

Unified Diff: tools/gn/loader.cc

Issue 1370603002: Make some global pointers const void* const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 months 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 | « tools/gn/loader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/loader.cc
diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc
index 5f5324b15e630ff76cb63eba841d40e5fb38017a..aebb6af0ee95a2911026c1c7f5f83cdfcdcbc693 100644
--- a/tools/gn/loader.cc
+++ b/tools/gn/loader.cc
@@ -79,7 +79,7 @@ struct LoaderImpl::ToolchainRecord {
// -----------------------------------------------------------------------------
-const void* Loader::kDefaultToolchainKey = &kDefaultToolchainKey;
+const void* const Loader::kDefaultToolchainKey = &kDefaultToolchainKey;
Loader::Loader() {
}
@@ -350,7 +350,7 @@ void LoaderImpl::DidLoadBuildConfig(const Label& label) {
//
// In this case, we should have exactly one entry in the map with an empty
// label. We now need to fix up the naming so it refers to the "real" one.
- CHECK(toolchain_records_.size() == 1);
+ CHECK_EQ(1U, toolchain_records_.size());
ToolchainRecordMap::iterator empty_label = toolchain_records_.find(Label());
CHECK(empty_label != toolchain_records_.end());
@@ -398,7 +398,7 @@ void LoaderImpl::DidLoadBuildConfig(const Label& label) {
}
void LoaderImpl::DecrementPendingLoads() {
- DCHECK(pending_loads_ > 0);
+ DCHECK_GT(pending_loads_, 0);
pending_loads_--;
if (pending_loads_ == 0 && !complete_callback_.is_null())
complete_callback_.Run();
« no previous file with comments | « tools/gn/loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698