Index: src/pdf/SkPDFStream.cpp |
diff --git a/src/pdf/SkPDFStream.cpp b/src/pdf/SkPDFStream.cpp |
index e570976403382cac79dfcb327030391fa9a08253..815ef481ee2135abab110171975687f6d8a6d28a 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->mergeFrom(pdfStream); |
+ if (removeLength) { |
+ this->remove("Length"); |
} |
} |