diff options
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r-- | chrome/browser/printing/page_number.cc | 6 | ||||
-rw-r--r-- | chrome/browser/printing/page_setup.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/printing/page_number.cc b/chrome/browser/printing/page_number.cc index d5310d3..941fa730 100644 --- a/chrome/browser/printing/page_number.cc +++ b/chrome/browser/printing/page_number.cc @@ -4,6 +4,8 @@ #include "chrome/browser/printing/page_number.h" +#include <limits> + #include "base/logging.h" #include "chrome/browser/printing/print_settings.h" @@ -56,7 +58,9 @@ int PageNumber::operator++() { ++page_number_; // Page ranges are inclusive. if (page_number_ > (*ranges_)[page_range_index_].to) { - if (++page_range_index_ == ranges_->size()) { + DCHECK(ranges_->size() <= static_cast<size_t>( + std::numeric_limits<int>::max())); + if (++page_range_index_ == static_cast<int>(ranges_->size())) { // Finished. *this = npos(); } else { diff --git a/chrome/browser/printing/page_setup.h b/chrome/browser/printing/page_setup.h index 572f604..558eb44 100644 --- a/chrome/browser/printing/page_setup.h +++ b/chrome/browser/printing/page_setup.h @@ -25,8 +25,8 @@ class PageMargins { int footer; // Margin on each side of the sheet. int left; - int top; int right; + int top; int bottom; }; |