diff options
author | bungeman <bungeman@google.com> | 2016-01-05 14:59:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-05 14:59:40 -0800 |
commit | 221524de3be1fc343ad328c5e99562f32b5cad9c (patch) | |
tree | d9b791db0ff48921388d2b7443fd5fc58f0b9583 /src/pdf/SkPDFMetadata.cpp | |
parent | 3c1468188924ede1e6589cddee84031c16782226 (diff) |
Start using <type_traits> and <utility> (C++11).
SkUtility.h and SkTLogic.h implement a number of type traits now
available through <type_traits> and <utility>. This removes SkUtility.h,
replacing it with <utility>, and moves a number of traits in
SkTLogic.h to use the std:: equivelents. This change only uses C++11
parts of the standard library; SkTLogic.h will continue to provide
C++14 and beyond for now in the skstd namespace.
The changes to SkTLogic.h are being done gradually so that safe changes
may be landed confidently, with more risky changes in the future.
Review URL: https://codereview.chromium.org/1561683002
Diffstat (limited to 'src/pdf/SkPDFMetadata.cpp')
-rw-r--r-- | src/pdf/SkPDFMetadata.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp index 3f181f5d73..51619c6748 100644 --- a/src/pdf/SkPDFMetadata.cpp +++ b/src/pdf/SkPDFMetadata.cpp @@ -7,6 +7,7 @@ #include "SkPDFMetadata.h" #include "SkPDFTypes.h" +#include <utility> #ifdef SK_PDF_GENERATE_PDFA #include "SkMD5.h" @@ -117,7 +118,7 @@ static SkString sk_string_printf(const char* format, ...) { va_end(args); SkASSERT(check == length); SkASSERT(string[length] == '\0'); - return skstd::move(string); + return std::move(string); #else // C99/C++11 standard vsnprintf // TODO: When all compilers support this, remove windows-specific code. va_list args; @@ -138,7 +139,7 @@ static SkString sk_string_printf(const char* format, ...) { va_end(args); SkASSERT(check == length); SkASSERT(string[length] == '\0'); - return skstd::move(string); + return std::move(string); #endif } @@ -185,7 +186,7 @@ static SkString uuid_to_string(const SkPDFMetadata::UUID& uuid) { namespace { class PDFXMLObject final : public SkPDFObject { public: - PDFXMLObject(SkString xml) : fXML(skstd::move(xml)) {} + PDFXMLObject(SkString xml) : fXML(std::move(xml)) {} void emitObject(SkWStream* stream, const SkPDFObjNumMap& omap, const SkPDFSubstituteMap& smap) const override { @@ -258,7 +259,7 @@ const SkString escape_xml(const SkString& input, // Validate that we haven't written outside of our string. SkASSERT(out == &output.writable_str()[output.size()]); *out = '\0'; - return skstd::move(output); + return std::move(output); } SkPDFObject* SkPDFMetadata::createXMPObject(const UUID& doc, |