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

Unified Diff: net/disk_cache/blockfile/rankings.cc

Issue 1499423004: Remove kint32max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint9
Patch Set: rebase 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 | « net/disk_cache/blockfile/index_table_v3.cc ('k') | net/disk_cache/cache_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/rankings.cc
diff --git a/net/disk_cache/blockfile/rankings.cc b/net/disk_cache/blockfile/rankings.cc
index 6ea790955c7d8362ce1ce56a794afbc7f88f308f..0f061413b1800afb17c278eb4608a7c18231e159 100644
--- a/net/disk_cache/blockfile/rankings.cc
+++ b/net/disk_cache/blockfile/rankings.cc
@@ -4,6 +4,10 @@
#include "net/disk_cache/blockfile/rankings.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "net/disk_cache/blockfile/backend_impl.h"
#include "net/disk_cache/blockfile/disk_format.h"
#include "net/disk_cache/blockfile/entry_impl.h"
@@ -907,8 +911,8 @@ void Rankings::IncrementCounter(List list) {
if (!count_lists_)
return;
- DCHECK(control_data_->sizes[list] < kint32max);
- if (control_data_->sizes[list] < kint32max)
+ DCHECK(control_data_->sizes[list] < std::numeric_limits<int32_t>::max());
+ if (control_data_->sizes[list] < std::numeric_limits<int32_t>::max())
control_data_->sizes[list]++;
}
« no previous file with comments | « net/disk_cache/blockfile/index_table_v3.cc ('k') | net/disk_cache/cache_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698