Chromium Code Reviews| Index: src/pdf/SkPDFStream.cpp |
| diff --git a/src/pdf/SkPDFStream.cpp b/src/pdf/SkPDFStream.cpp |
| index e570976403382cac79dfcb327030391fa9a08253..44f839fdb16debc0878bc19ebc867869e4123cbc 100644 |
| --- a/src/pdf/SkPDFStream.cpp |
| +++ b/src/pdf/SkPDFStream.cpp |
| @@ -36,15 +36,9 @@ SkPDFStream::SkPDFStream(const SkPDFStream& pdfStream) |
| fState = kCompressed_State; |
| removeLength = false; |
| } |
| - SkPDFDict::Iter dict(pdfStream); |
| - SkPDFName* key; |
| - SkPDFObject* value; |
| - SkPDFName lengthName("Length"); |
| - for (key = dict.next(&value); key != NULL; key = dict.next(&value)) { |
| - if (removeLength && *key == lengthName) { |
| - continue; |
| - } |
| - this->insert(key, value); |
| + this->insertDict(pdfStream); |
|
mtklein
2014/06/27 15:26:51
Can either of these become private methods of SkPD
hal.canary
2014/06/27 16:03:27
I don't see how. At least this is an improvement
|
| + if (removeLength) { |
| + this->remove("Length"); |
| } |
| } |