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

Unified Diff: printing/pdf_metafile_cg_mac.cc

Issue 2458513003: Addressing C4267 warnings for printing. (Closed)
Patch Set: same as patch set 3, to see today's try bot output Created 4 years, 2 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 | « printing/pdf_metafile_cg_mac.h ('k') | printing/pdf_metafile_skia.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_cg_mac.cc
diff --git a/printing/pdf_metafile_cg_mac.cc b/printing/pdf_metafile_cg_mac.cc
index c9eb9df910b9cc51ae4451fa6d1b099cde080b12..96984939da184a85ba9f9606de8d0146d6ead315 100644
--- a/printing/pdf_metafile_cg_mac.cc
+++ b/printing/pdf_metafile_cg_mac.cc
@@ -87,13 +87,12 @@ bool PdfMetafileCg::Init() {
}
bool PdfMetafileCg::InitFromData(const void* src_buffer,
- uint32_t src_buffer_size) {
+ size_t src_buffer_size) {
DCHECK(!context_.get());
DCHECK(!pdf_data_.get());
- if (!src_buffer || src_buffer_size == 0) {
+ if (!src_buffer || !src_buffer_size)
return false;
- }
pdf_data_.reset(CFDataCreateMutable(kCFAllocatorDefault, src_buffer_size));
Will Harris 2016/10/27 22:52:34 is a CFIndex the same type as a size_t? I have no
Lei Zhang 2016/10/27 23:15:14 Neither do I, but I found https://opensource.apple
CFDataAppendBytes(pdf_data_, static_cast<const UInt8*>(src_buffer),
« no previous file with comments | « printing/pdf_metafile_cg_mac.h ('k') | printing/pdf_metafile_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698