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

Unified Diff: src/ports/SkFontMgr_android_parser.cpp

Issue 1555153002: Add skstd::remove_pointer_t and use it. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/private/SkTLogic.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android_parser.cpp
diff --git a/src/ports/SkFontMgr_android_parser.cpp b/src/ports/SkFontMgr_android_parser.cpp
index ba2296bffa679ab061a32ec24f46ca4f0b728659..29ea52523dc25d4e9d2ef6a434369409c7a450dc 100644
--- a/src/ports/SkFontMgr_android_parser.cpp
+++ b/src/ports/SkFontMgr_android_parser.cpp
@@ -12,6 +12,7 @@
#include "SkTDArray.h"
#include "SkTSearch.h"
#include "SkTemplates.h"
+#include "SkTLogic.h"
#include <dirent.h>
#include <expat.h>
@@ -579,9 +580,6 @@ static const XML_Memory_Handling_Suite sk_XML_alloc = {
sk_free
};
-template<typename T> struct remove_ptr {typedef T type;};
-template<typename T> struct remove_ptr<T*> {typedef T type;};
-
/**
* This function parses the given filename and stores the results in the given
* families array. Returns the version of the file, negative if the file does not exist.
@@ -598,7 +596,7 @@ static int parse_config_file(const char* filename, SkTDArray<FontFamily*>& famil
return -1;
}
- SkAutoTCallVProc<remove_ptr<XML_Parser>::type, XML_ParserFree> parser(
+ SkAutoTCallVProc<skstd::remove_pointer_t<XML_Parser>, XML_ParserFree> parser(
XML_ParserCreate_MM(nullptr, &sk_XML_alloc, nullptr));
if (!parser) {
SkDebugf(SK_FONTMGR_ANDROID_PARSER_PREFIX "could not create XML parser\n");
« no previous file with comments | « include/private/SkTLogic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698