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

Unified Diff: include/core/SkString.h

Issue 1814153003: Templatize SkToXXX. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Chromium actually uses 4.6.4. Created 4 years, 9 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 | « gyp/utils.gypi ('k') | include/core/SkTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkString.h
diff --git a/include/core/SkString.h b/include/core/SkString.h
index 42466af80bfc9191d4bc960423238892f6cec79f..1c3ee3a20c22979e7409eab9f4ab5b337e6e7155 100644
--- a/include/core/SkString.h
+++ b/include/core/SkString.h
@@ -36,13 +36,13 @@ int SkStrStartsWithOneOf(const char string[], const char prefixes[]);
static int SkStrFind(const char string[], const char substring[]) {
const char *first = strstr(string, substring);
if (NULL == first) return -1;
- return SkToS32(first - &string[0]);
+ return SkToInt(first - &string[0]);
}
static int SkStrFindLastOf(const char string[], const char subchar) {
const char* last = strrchr(string, subchar);
if (NULL == last) return -1;
- return SkToS32(last - &string[0]);
+ return SkToInt(last - &string[0]);
}
static bool SkStrContains(const char string[], const char substring[]) {
« no previous file with comments | « gyp/utils.gypi ('k') | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698