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

Side by Side Diff: src/pdf/SkPDFTypes.h

Issue 1071583003: SkPDF: Remove Array's unused set(i) and get(i) (leaving only append()) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | src/pdf/SkPDFTypes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef SkPDFTypes_DEFINED 10 #ifndef SkPDFTypes_DEFINED
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 /** The size of the array. 244 /** The size of the array.
245 */ 245 */
246 int size() { return fValue.count(); } 246 int size() { return fValue.count(); }
247 247
248 /** Preallocate space for the given number of entries. 248 /** Preallocate space for the given number of entries.
249 * @param length The number of array slots to preallocate. 249 * @param length The number of array slots to preallocate.
250 */ 250 */
251 void reserve(int length); 251 void reserve(int length);
252 252
253 /** Returns the object at the given offset in the array.
254 * @param index The index into the array to retrieve.
255 */
256 SkPDFObject* getAt(int index) { return fValue[index]; }
257
258 /** Set the object at the given offset in the array. Ref's value.
259 * @param index The index into the array to set.
260 * @param value The value to add to the array.
261 * @return The value argument is returned.
262 */
263 SkPDFObject* setAt(int index, SkPDFObject* value);
264
265 /** Append the object to the end of the array and increments its ref count. 253 /** Append the object to the end of the array and increments its ref count.
266 * @param value The value to add to the array. 254 * @param value The value to add to the array.
267 * @return The value argument is returned. 255 * @return The value argument is returned.
268 */ 256 */
269 SkPDFObject* append(SkPDFObject* value); 257 SkPDFObject* append(SkPDFObject* value);
270 258
271 /** Creates a SkPDFInt object and appends it to the array. 259 /** Creates a SkPDFInt object and appends it to the array.
272 * @param value The value to add to the array. 260 * @param value The value to add to the array.
273 */ 261 */
274 void appendInt(int32_t value); 262 void appendInt(int32_t value);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 int32_t getObjectNumber(SkPDFObject* obj) const; 430 int32_t getObjectNumber(SkPDFObject* obj) const;
443 431
444 const SkTDArray<SkPDFObject*>& objects() const { return fObjects; } 432 const SkTDArray<SkPDFObject*>& objects() const { return fObjects; }
445 433
446 private: 434 private:
447 SkTDArray<SkPDFObject*> fObjects; 435 SkTDArray<SkPDFObject*> fObjects;
448 SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers; 436 SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers;
449 }; 437 };
450 438
451 #endif 439 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698