SkPDF: AutoTUnref<T> changes in use
::detach() -> ::release()
::operator T*() -> ::get()
This makes all use of AutoTUnref work the same as sk_sp.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1772493002
Review URL: https://codereview.chromium.org/1772493002
diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp
index 51619c6..8359786 100644
--- a/src/pdf/SkPDFMetadata.cpp
+++ b/src/pdf/SkPDFMetadata.cpp
@@ -45,7 +45,7 @@
if (fModified) {
dict->insertString("ModDate", pdf_date(*fModified.get()));
}
- return dict.detach();
+ return dict.release();
}
#ifdef SK_PDF_GENERATE_PDFA
@@ -92,7 +92,7 @@
SkString(reinterpret_cast<const char*>(&doc), sizeof(UUID)));
array->appendString(
SkString(reinterpret_cast<const char*>(&instance), sizeof(UUID)));
- return array.detach();
+ return array.release();
}
// Improvement on SkStringPrintf to allow for arbitrarily long output.