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

Side by Side Diff: src/pdf/SkPDFCatalog.cpp

Issue 12480002: Fixing some warnings on Linux (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkPDFCatalog.h" 10 #include "SkPDFCatalog.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 stream->writeText(" "); 122 stream->writeText(" ");
123 stream->writeDecAsText(last - first + 1); 123 stream->writeDecAsText(last - first + 1);
124 stream->writeText("\n"); 124 stream->writeText("\n");
125 125
126 if (first == -1) { 126 if (first == -1) {
127 stream->writeText("0000000000 65535 f \n"); 127 stream->writeText("0000000000 65535 f \n");
128 first++; 128 first++;
129 } 129 }
130 for (int i = first; i <= last; i++) { 130 for (int i = first; i <= last; i++) {
131 SkASSERT(fCatalog[i].fFileOffset > 0); 131 SkASSERT(fCatalog[i].fFileOffset > 0);
132 SkASSERT(fCatalog[i].fFileOffset <= 9999999999LL); 132 SkASSERT(fCatalog[i].fFileOffset < 2147483647);
sugoi 2013/03/06 16:14:59 On 32 bits platforms, off_t is a 32 bits signed in
133 stream->writeBigDecAsText(fCatalog[i].fFileOffset, 10); 133 stream->writeBigDecAsText(fCatalog[i].fFileOffset, 10);
134 stream->writeText(" 00000 n \n"); 134 stream->writeText(" 00000 n \n");
135 } 135 }
136 136
137 return fCatalog.count() + 1; 137 return fCatalog.count() + 1;
138 } 138 }
139 139
140 void SkPDFCatalog::setSubstitute(SkPDFObject* original, 140 void SkPDFCatalog::setSubstitute(SkPDFObject* original,
141 SkPDFObject* substitute) { 141 SkPDFObject* substitute) {
142 #if defined(SK_DEBUG) 142 #if defined(SK_DEBUG)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 SkTDArray<SkPDFObject*>* targetList = getSubstituteList(firstPage); 199 SkTDArray<SkPDFObject*>* targetList = getSubstituteList(firstPage);
200 for (int i = 0; i < targetList->count(); ++i) { 200 for (int i = 0; i < targetList->count(); ++i) {
201 (*targetList)[i]->emit(stream, this, true); 201 (*targetList)[i]->emit(stream, this, true);
202 } 202 }
203 } 203 }
204 204
205 SkTDArray<SkPDFObject*>* SkPDFCatalog::getSubstituteList(bool firstPage) { 205 SkTDArray<SkPDFObject*>* SkPDFCatalog::getSubstituteList(bool firstPage) {
206 return firstPage ? &fSubstituteResourcesFirstPage : 206 return firstPage ? &fSubstituteResourcesFirstPage :
207 &fSubstituteResourcesRemaining; 207 &fSubstituteResourcesRemaining;
208 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698