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

Unified Diff: base/debug/crash_logging.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 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 | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/crash_logging.cc
diff --git a/base/debug/crash_logging.cc b/base/debug/crash_logging.cc
index caf10b49b07185dfcf26eeb9b6fcdbe471f21151..f9b44490d4bd7165deb75ea066ea7ee6718a6688 100644
--- a/base/debug/crash_logging.cc
+++ b/base/debug/crash_logging.cc
@@ -36,7 +36,8 @@ ClearCrashKeyValueFuncT g_clear_key_func_ = NULL;
// For a given |length|, computes the number of chunks a value of that size
// will occupy.
size_t NumChunksForLength(size_t length) {
- return std::ceil(length / static_cast<float>(g_chunk_max_length_));
+ // Compute (length / g_chunk_max_length_), rounded up.
+ return (length + g_chunk_max_length_ - 1) / g_chunk_max_length_;
}
// The longest max_length allowed by the system.
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698