diff options
author | Hal Canary <halcanary@google.com> | 2018-06-19 09:53:26 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-19 20:11:33 +0000 |
commit | c9b6dda8042dcdd478a3218474fcd1656bb87076 (patch) | |
tree | d94bef982979972b2675c06e8d6ffaebb57c7f5c /src/core/SkUtils.h | |
parent | 3425e22b9e9781570db306dfa70a47e34824be9e (diff) |
SkUtils: safe SkUTF16_NextUnichar
Change-Id: Ief70f3055d9612c8934ede967c1048dd7fcb102a
Reviewed-on: https://skia-review.googlesource.com/135705
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkUtils.h')
-rw-r--r-- | src/core/SkUtils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkUtils.h b/src/core/SkUtils.h index 6037b60c3c..795b47a0c4 100644 --- a/src/core/SkUtils.h +++ b/src/core/SkUtils.h @@ -84,6 +84,8 @@ size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = nullptr); int SkUTF16_CountUnichars(const uint16_t utf16[]); // returns the current unichar and then moves past it (*p++) SkUnichar SkUTF16_NextUnichar(const uint16_t**); +SkUnichar SkUTF16_NextUnichar(const uint16_t** srcPtr, const uint16_t* end); + // this guy backs up to the previus unichar value, and returns it (*--p) SkUnichar SkUTF16_PrevUnichar(const uint16_t**); size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = nullptr); |